Re: [PATCH][PR target/80358][7 regression] Fix boundary check error in expand_block_compare

2017-04-07 Thread Segher Boessenkool
On Fri, Apr 07, 2017 at 02:38:50PM -0500, Aaron Sawdey wrote: > Turns out we get passed const -1 for the length arg from this code. > ROUND_UP adds load_mode_size to that resulting in a small positive > number, hilarity ensues. Glad you liked it as well ;-) > Fixed by computing a sensible limit a

[PATCH][PR target/80358][7 regression] Fix boundary check error in expand_block_compare

2017-04-07 Thread Aaron Sawdey
Turns out we get passed const -1 for the length arg from this code. ROUND_UP adds load_mode_size to that resulting in a small positive number, hilarity ensues. Fixed by computing a sensible limit and using IN_RANGE instead, which won't overflow in this way. OK for trunk if bootstrap/regtest in pro