Re: [PATCH] Another extract_muldiv-induced overflow (PR sanitizer/80932)

2017-06-06 Thread Jeff Law
On 06/06/2017 04:31 AM, Marek Polacek wrote: > Another case of extract_muldiv running off the rails. Here it did a wrong > distribution; turning > > ((A * x) - (B * x)) * -6 > > into > > (A' * x) - (B' * x) > > incurred an overflow in the subtraction. The fix is essentially the same > as

[PATCH] Another extract_muldiv-induced overflow (PR sanitizer/80932)

2017-06-06 Thread Marek Polacek
Another case of extract_muldiv running off the rails. Here it did a wrong distribution; turning ((A * x) - (B * x)) * -6 into (A' * x) - (B' * x) incurred an overflow in the subtraction. The fix is essentially the same as what I did in sanitizer/80800. Bootstrapped/regtested on x86_64-l