[PATCH] [ubsan] Emit single check for Shl

2013-02-25 Thread Will Dietz
See attached. This is important to avoid warning twice on shifts that fail both checks, like 1 -1. The branching is done to avoid executing the second check's shift with invalid operands (poisoning the result), especially since we already know the shift is invalid. Thanks! ~Will

Re: [PATCH] [ubsan] Emit single check for Shl

2013-02-25 Thread Richard Smith
On Mon, Feb 25, 2013 at 1:02 PM, Will Dietz wdie...@illinois.edu wrote: See attached. This is important to avoid warning twice on shifts that fail both checks, like 1 -1. The branching is done to avoid executing the second check's shift with invalid operands (poisoning the result),

Re: [PATCH] [ubsan] Emit single check for Shl

2013-02-25 Thread Will Dietz
Great, thanks for taking a look. Didn't know about omitting labels in -Asserts, updated tests accordingly and committed as r176056. (After confirming works on an -Asserts build) Thanks! ~Will On Mon, Feb 25, 2013 at 3:51 PM, Richard Smith rich...@metafoo.co.uk wrote: On Mon, Feb 25, 2013 at