This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] PR 85025: libgcc/config/i386/shadow-stack-unwind.h is wrong
- From: "Tsimbalist, Igor V" <igor dot v dot tsimbalist at intel dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, "Tsimbalist, Igor V" <igor dot v dot tsimbalist at intel dot com>
- Date: Thu, 22 Mar 2018 11:11:35 +0000
- Subject: [PATCH] PR 85025: libgcc/config/i386/shadow-stack-unwind.h is wrong
- Dlp-product: dlpe-windows
- Dlp-reaction: no-action
- Dlp-version: 11.0.0.116
The incspp instruction from CET accepts only the value in the range of 0-255.
The patch fixes the typo in the loop to handle this.
I'm checking in the fix as obvious.
Thanks,
Igor
PR target/85025
* config/i386/shadow-stack-unwind.h: Fix a typo, tmp => 255.
Index: libgcc/config/i386/shadow-stack-unwind.h
===================================================================
--- libgcc/config/i386/shadow-stack-unwind.h (revision 258760)
+++ libgcc/config/i386/shadow-stack-unwind.h (working copy)
@@ -42,7 +42,7 @@
_Unwind_Word tmp = (x); \
while (tmp > 255) \
{ \
- _inc_ssp (tmp); \
+ _inc_ssp (255); \
tmp -= 255; \
} \
_inc_ssp (tmp); \
Igor