https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85334
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to H.J. Lu from comment #1) > My patch doesn't fix g++.dg/eh/sighandle.C compiled with > > -O2 -fcf-protection -mcet It is because (gdb) bt #0 _Unwind_RaiseException (exc=exc@entry=0x416ed0) at /export/gnu/import/git/sources/gcc/libgcc/unwind.inc:141 #1 0x00007ffff7d983db in __cxxabiv1::__cxa_throw (obj=obj@entry=0x416ef0, tinfo=0x403dd0 <typeinfo for int@@CXXABI_1.3>, dest=dest@entry=0x0) at /export/gnu/import/git/sources/gcc/libstdc++-v3/libsupc++/eh_throw.cc:90 #2 0x00000000004010cf in sighandler (signo=<optimized out>, si=<optimized out>, uc=<optimized out>) #3 <signal handler called> #4 dosegv () at x.cc:36 <<<<< This is inlined and isn't on shadow stack. #5 main () at x.cc:36 #6 0x00007ffff7990433 in __libc_start_main () from /lib64/libc.so.6 #7 0x00000000004011be in _start () at x.cc:36