search for: n_weight

Displaying 1 result from an estimated 1 matches for "n_weight".

Did you mean: c_weight
2015 Nov 12
3
Inexplicable ASAN report. Code generation bug?
.../ struct NumericShort n_short; /* Short form (2-byte header) */ }; struct NumericShort { uint16 n_header; /* Sign + display scale + weight */ NumericDigit n_data[FLEXIBLE_ARRAY_MEMBER]; /* Digits */ }; struct NumericLong { uint16 n_sign_dscale; /* Sign + display scale */ int16 n_weight; /* Weight of 1st digit */ NumericDigit n_data[FLEXIBLE_ARRAY_MEMBER]; /* Digits */ }; So it looks to me like -O2 is causing the optimizer to turn the 2-byte read into a 4-byte read and overrun the allocated object. But I haven't tried looking at the assembly yet. -- greg