https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85334
--- Comment #7 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> --- Author: hjl Date: Wed Oct 3 16:55:06 2018 New Revision: 264814 URL: https://gcc.gnu.org/viewcvs?rev=264814&root=gcc&view=rev Log: i386: Remove _Unwind_Frames_Increment CET kernel has been changed to place a restore token on shadow stack for signal handler to enhance security. It is usually transparent to user programs since kernel will pop the restore token when signal handler returns. But when an exception is thrown from a signal handler, now we need to remove _Unwind_Frames_Increment to pop the the restore token from shadow stack. Otherwise, we get FAIL: g++.dg/torture/pr85334.C -O0 execution test FAIL: g++.dg/torture/pr85334.C -O1 execution test FAIL: g++.dg/torture/pr85334.C -O2 execution test FAIL: g++.dg/torture/pr85334.C -O3 -g execution test FAIL: g++.dg/torture/pr85334.C -Os execution test FAIL: g++.dg/torture/pr85334.C -O2 -flto -fno-use-linker-plugin -flto-partition=none execution test Backport from mainline 2018-07-27 H.J. Lu <hongjiu...@intel.com> PR libgcc/85334 * config/i386/shadow-stack-unwind.h (_Unwind_Frames_Increment): Removed. Modified: branches/gcc-8-branch/libgcc/ChangeLog branches/gcc-8-branch/libgcc/config/i386/shadow-stack-unwind.h