http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58443
Bug ID: 58443
Summary: ubsan doesn't properly honor fsanitize= flags
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: mpolacek at gcc dot gnu.org
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
$ cat z.c
int
main (void)
{
int i = 12;
i <<= 48;
return 0;
}
$ gcc -w -o z{,.c} -fsanitize=unreachable && ./z
z.c:5:5: runtime error: shift exponent 48 is too large for 32-bit type int
We shouldn't instrument shifts, only __builtin_unreachable's in this case.