On 12/04/2015 01:48 PM, Paolo Bonzini wrote:
gcc:
PR sanitizer/68418
* c-family/c-ubsan.c (ubsan_instrument_shift): Disable
sanitization of left shifts for wrapping signed types as well.
gcc/testsuite:
PR sanitizer/68418
* gcc.dg/ubsan/c99-wrapv-shift-1.c,
gcc.dg/ubsan/c99-wrapv-shift-2.c: New testcases.
Doesn't this change how pointer types are handled?
Why would pointer types be shifted at all (at the ubsan level,
which is basically the AST)?
BTW, if you argument is that we can never get into this code with a
shift of a pointer object, I'd like to see some kind of analysis to back
up that assertion -- which could be as simple as pointing to FE code
that issues an error if the user tried to do something like shift a
pointer object.
jeff