https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80953
--- Comment #13 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > This is weird: this test PASSes for me on Solaris 11.3, 11.4 and 11.5, > both 32 and 64-bit, as and gas. A more useful backtrace just before the crash: (gdb) bt #0 0xfe8d9080 in free () from /home/botcazou/gcc-head/install_sparc/lib/libasan.so.5 #1 0xff14de1c in __deregister_frame_info_bases (begin=<optimized out>) at /homes/botcazou/gcc-head/src/libgcc/unwind-dw2-fde.c:228 #2 __deregister_frame_info_bases (begin=0xff15f044) at /homes/botcazou/gcc-head/src/libgcc/unwind-dw2-fde.c:201 #3 0xff1435fc in __do_global_dtors_aux () from /home/botcazou/gcc-head/install_sparc/lib/libgcc_s.so.1 #4 0xff14ed80 in _fini () from /home/botcazou/gcc-head/install_sparc/lib/libgcc_s.so.1 #5 0xff1b236c in call_fini () from /usr/lib/ld.so.1 #6 0xff1b24a4 in atexit_fini () from /usr/lib/ld.so.1 #7 0xff05c128 in _exithandle () from /lib/libc.so.1 #8 0xff049f94 in exit () from /lib/libc.so.1 #9 0x00010dfc in _start () so libgcc is dereferencing its EH frames by invoking libasan's free... The bottom line is that you need to HAVE_LD_EH_FRAME_HDR enabled in the compiler otherwise the sanitizer is unusable (it wasn't because the configure script requires GNU sed and only found the system sed on the machine).