https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78651
chefmax at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |chefmax at gcc dot gnu.org
--- Comment #4 from chefmax at gcc dot gnu.org ---
Hm, it seems that ASan is breaking internal ABI between GCC and libstdc++ by
adding redzones to global .LDFCM* symbols:
$ ~/install/master/bin/g++ /tmp/throws.cc -fsanitize=address -fPIC -S -o bad.s
...
.LLSDACSE1:
.byte 0x2
.byte 0
.byte 0x1
.byte 0x7d
.align 4
.long DW.ref._ZTI1A-.
.long .LDFCM0-.
.LLSDATT1:
...
...
...
.LDFCM0:
.zero 56 <============== inserted by ASan
.quad _ZTIN12_GLOBAL__N_114SomeRandomTypeE
.hidden DW.ref.__gxx_personality_v0
.weak DW.ref.__gxx_personality_v0
.section
.data.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
.align 8
.type DW.ref.__gxx_personality_v0, @object
.size DW.ref.__gxx_personality_v0, 8
AFAU, during exception handling, libstdc++ tries to obtain a pointer to
`typeinfo for (anonymous namespace)::SomeRandomType' from a constant offset
from `.LDFCM0' label and gets zero, because ASan added a right redzone. I
suspect that not sanitizing `.LDFCM*' variables (and probably all other debug
vars) should resolve the issue.