https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80953
--- Comment #5 from Rainer Orth <ro at gcc dot gnu.org> --- Created attachment 41484 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41484&action=edit Merge libsanitizer from compiler-rt r304722 I've now completed a merge of llvm r304722 into gcc trunk libsanitizer. Most of it was straightforward, but a couple of issues may save others work: * Two bugs in sanitizer_common/sanitizer_symbolizer_libbacktrace.cc have already been reported upstream: https://reviews.llvm.org/D33933 * In libubsan, __ubsan_handle_type_mismatch has been renamed to __ubsan_handle_type_mismatch_v1, and likewise for __ubsan_handle_type_mismatch_abort__ubsan_handle_type_mismatch_v1_abort The sanitizer.def and ubsan.c changes reflect this. Worse, however, the former uptr Alignment member of ubsan/ubsan_handlers.h was changed to unsigned char LogAlignment. This needs a corresponding gcc change to pass log2(align) instead of just align. * Many (all) */float-cast-overflow-*.c tests FAILed initially because of a message change: runtime error: value -133 is outside the range of representable values of type 'signed char' lost the leading "value" With these gcc side changes, testresults on x86_64-pc-linux-gnu are identical to those with current gcc trunk, with the exception of +FAIL: c-c++-common/asan/pr63888.c -O2 execution test +FAIL: c-c++-common/asan/pr63888.c -O2 -flto execution test +FAIL: c-c++-common/asan/pr63888.c -O2 -flto -flto-partition=none execution t est +FAIL: c-c++-common/asan/pr63888.c -O3 -g execution test +FAIL: c-c++-common/asan/pr63888.c -Os execution test I get here ================================================================= ==4734==ERROR: AddressSanitizer: odr-violation (0x0000004009e0): [1] size=12 'CSWTCH.1' /vol/gcc/src/hg/trunk/solaris-asan/gcc/testsuite/c-c++-common/asan/pr63888.c:8:3 [2] size=12 'CSWTCH.3' /vol/gcc/src/hg/trunk/solaris-asan/gcc/testsuite/c-c++-common/asan/pr63888.c:21:3 These globals were registered at these points: [1]: #0 0x7f2c9c48fb88 in __asan_register_globals /vol/gcc/src/hg/trunk/solaris-asan/libsanitizer/asan/asan_globals.cc:356 #1 0x40097c in __libc_csu_init (/var/scratch/gcc/gcc-8.0.0-20170531/4.10.10-gcc-gas-gld-asan/gcc/testsuite/gcc17/pr63888.exe+0x40097c) [2]: #0 0x7f2c9c48fb88 in __asan_register_globals /vol/gcc/src/hg/trunk/solaris-asan/libsanitizer/asan/asan_globals.cc:356 #1 0x40097c in __libc_csu_init (/var/scratch/gcc/gcc-8.0.0-20170531/4.10.10-gcc-gas-gld-asan/gcc/testsuite/gcc17/pr63888.exe+0x40097c) ==4734==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0 SUMMARY: AddressSanitizer: odr-violation: global 'CSWTCH.1' at /vol/gcc/src/hg/trunk/solaris-asan/gcc/testsuite/c-c++-common/asan/pr63888.c:8:3 ==4734==ABORTING Someone who knows that code way better needs to look into this. Rainer