https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63964
Bug ID: 63964
Summary: c-c++-common/asan/misalign-1.c fails on darwin
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sanitizer
Assignee: unassigned at gcc dot gnu.org
Reporter: fxcoudert 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
Both c-c++-common/asan/misalign-1.c and c-c++-common/asan/misalign-2.c fail on
x86_64-apple-darwin14, with the output of libsanitizer not matching what is
expected.
misalign-1.c gives:
==68858==ERROR: AddressSanitizer: unknown-crash on address 0x7fff5e28d99f at pc
0x000101972c02 bp 0x7fff5e28d8d0 sp 0x7fff5e28d8c8
READ of size 4 at 0x7fff5e28d99f thread T0
#0 0x101972c01 in foo /Users/fx/devel/gcc/irun2/misalign-1.c:10
#1 0x101972e97 in _GLOBAL__sub_I_00099_0_misalign_1.c
(/Users/fx/devel/gcc/irun2/./a.out+0x100000e97)
where the test expects #1 symbol to be "main". At -m32, it gives:
==68878==ERROR: AddressSanitizer: unknown-crash on address 0xbffa9a3f at pc
0x00057b09 bp 0xbffa9938 sp 0xbffa992c
READ of size 4 at 0xbffa9a3f thread T0
#0 0x57b08 in foo /Users/fx/devel/gcc/irun2/misalign-1.c:10
with not frame #1. The issues are exactly the same for misalign-2.c.
I don't know enough to determine whether this is a real issue or the test
simply needs the pattern adjusted.