libgcc patch committed: Increase x86_64 split-stack backoff size

Ian Lance Taylor
Mon Aug 3 23:02:14 GMT 2020

With the ever increasing number of vector registers, and the use of
the xsavec instruction in the dynamic linker trampolines in newer
glibc, we need to ensure a lot more space on the stack when using
-fsplit-stack.  This patch adds 2048 additional bytes to the required
stack space with -fsplit-stack.  Discovered by running the Go
testsuite on x86_64-pc-linux-gnu with glibc 2.30.  This patch fixes
that problem.  Ran all Go tests on x86_64-pc-linux-gnu.  Committed to

-------------- next part --------------
commit b3dc3bc7a785c33106aac50cbe39601e6d6b7e95
Author: Ian Lance Taylor <>
Date:   Mon Aug 3 15:59:45 2020 -0700

    libgcc: increase required stack space for x86_64 -fsplit-stack
    This accomodates increased space required by use of the xsavec
    instruction in the dynamic linker trampoline.
            * config/i386/morestack.S (BACKOFF) [x86_64]: Add 2048 bytes.

diff --git a/libgcc/config/i386/morestack.S b/libgcc/config/i386/morestack.S
index 519bbbc8c13..1c31783c754 100644
--- a/libgcc/config/i386/morestack.S
+++ b/libgcc/config/i386/morestack.S
@@ -79,7 +79,7 @@
 #ifndef __x86_64__
 #define BACKOFF (1024)
-#define BACKOFF (1536)
+#define BACKOFF (3584)

More information about the Gcc-patches mailing list