aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2018-10-03 16:55:06 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2018-10-03 09:55:06 -0700
commit8dbc89a849c364dcaa3c195fb7353d20eff20b6c (patch)
tree109df35484c8e4f3fc487770e3c06facdaa2b4a3 /libgcc
parentf60e7b4535c07b0a424b7b2a774343956f4fb407 (diff)
downloadgcc-8dbc89a849c364dcaa3c195fb7353d20eff20b6c.zip
gcc-8dbc89a849c364dcaa3c195fb7353d20eff20b6c.tar.gz
gcc-8dbc89a849c364dcaa3c195fb7353d20eff20b6c.tar.bz2
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.lu@intel.com> PR libgcc/85334 * config/i386/shadow-stack-unwind.h (_Unwind_Frames_Increment): Removed. From-SVN: r264814
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog8
-rw-r--r--libgcc/config/i386/shadow-stack-unwind.h5
2 files changed, 8 insertions, 5 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 62f33d3..e4e6042 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,11 @@
+2018-10-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ Backport from mainline
+ 2018-07-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR libgcc/85334
+ * config/i386/shadow-stack-unwind.h (_Unwind_Frames_Increment):
+
2018-08-17 John David Anglin <danglin@gcc.gnu.org>
Backport from mainline
diff --git a/libgcc/config/i386/shadow-stack-unwind.h b/libgcc/config/i386/shadow-stack-unwind.h
index a32f3e7..40f48df 100644
--- a/libgcc/config/i386/shadow-stack-unwind.h
+++ b/libgcc/config/i386/shadow-stack-unwind.h
@@ -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++