]> gcc.gnu.org Git - gcc.git/commitdiff
i386: Remove _Unwind_Frames_Increment
authorH.J. Lu <hongjiu.lu@intel.com>
Fri, 27 Jul 2018 14:40:47 +0000 (14:40 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Fri, 27 Jul 2018 14:40:47 +0000 (07:40 -0700)
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

PR libgcc/85334
* config/i386/shadow-stack-unwind.h (_Unwind_Frames_Increment):
Removed.

From-SVN: r263030

libgcc/ChangeLog
libgcc/config/i386/shadow-stack-unwind.h

index c13bf4cb2f663f6500c9748407108aa952018ecf..e0db8d16f98996f44bd8613166dbe5d54ed859ef 100644 (file)
@@ -1,3 +1,9 @@
+2018-07-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR libgcc/85334
+       * config/i386/shadow-stack-unwind.h (_Unwind_Frames_Increment):
+       Removed.
+
 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
 
        * configure: Regenerated.
index a32f3e74b52dffd092eab90cfc9dd76de0609840..40f48df2aecdc1c1836cf55853ef13cbde219f32 100644 (file)
@@ -49,8 +49,3 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
        }                                       \
     }                                          \
     while (0)
-
-/* Increment frame count.  Skip signal frames.  */
-#undef _Unwind_Frames_Increment
-#define _Unwind_Frames_Increment(context, frames) \
-  if (!_Unwind_IsSignalFrame (context)) frames++
This page took 0.079895 seconds and 5 git commands to generate.