The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

u/logging: Truncate hexdump at 16MB

authored by

Jakob Bornecrantz and committed by
Ryan Pavlik
d13f59f6 7ef4a21d

+14 -2
+14 -2
src/xrt/auxiliary/util/u_logging.c
··· 115 115 u_log(file, line, func, level, "%s", tmp); 116 116 117 117 offset += 16; 118 - if (offset > 0xffffffff) { /* Limit the dump length to 4GB(!) */ 118 + /* 119 + * Limit the dump length to 16MB, this used to be 4GB which 120 + * would on 32bit system always evaltuate to false. So we have 121 + * the limit on something more sensible. 122 + */ 123 + if (offset > 0x00ffffff) { 124 + u_log(file, line, func, level, "Truncating output over 16MB"); 119 125 break; 120 126 } 121 127 } ··· 138 144 u_log_xdev(file, line, func, level, xdev, "%s", tmp); 139 145 140 146 offset += 16; 141 - if (offset > 0xffffffff) { /* Limit the dump length to 4GB(!) */ 147 + /* 148 + * Limit the dump length to 16MB, this used to be 4GB which 149 + * would on 32bit system always evaltuate to false. So we have 150 + * the limit on something more sensible. 151 + */ 152 + if (offset > 0x00ffffff) { 153 + u_log_xdev(file, line, func, level, xdev, "Truncating output over 16MB"); 142 154 break; 143 155 } 144 156 }