]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
m68k: fix clobbering a5 in setjmp() [BZ #24202]
authorSergei Trofimovich <slyfox@gentoo.org>
Mon, 21 Dec 2020 04:54:34 +0000 (10:24 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 21 Dec 2020 04:54:34 +0000 (10:24 +0530)
setjmp() uses C code to store current registers into jmp_buf
environment. -fstack-protector-all places canary into setjmp()
prologue and clobbers 'a5' before it gets saved.

The change inhibits stack canary injection to avoid clobber.

sysdeps/m68k/setjmp.c

index 0b86f2d3eedccef5922d8a3b31e7320620415965..d8cc2515d2832176b977d68a22f9f75f214c747e 100644 (file)
@@ -19,6 +19,7 @@
 
 /* Save the current program position in ENV and return 0.  */
 int
+inhibit_stack_protector
 #if defined BSD_SETJMP
 # undef setjmp
 # define savemask 1