diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2017-05-17 11:07:36 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2017-05-17 11:13:49 +0200 |
commit | d183d93e47ad16bc9983107a419121b02e0da51e (patch) | |
tree | 4edb5f5e2b12afd21a3c123a2b5bf361a1d5ab30 /libc/sysdeps/linux/i386 | |
parent | baad294eaf59e0e1b311a11448a04e3d3c5f3c56 (diff) |
x86: fix segfaults on SMP machine
As reported by Bering-uClibc project uClibc-ng for x86
generates a segfault on SMP machines when trying to run ntpd.
A small test case is here: https://gist.github.com/ddrown
Use a similar nop instruction as for x86_64 in the code.
Signed-off-by: KP.Kirchdoerfer <kapeka@bering-uclibc.de>
Diffstat (limited to 'libc/sysdeps/linux/i386')
-rw-r--r-- | libc/sysdeps/linux/i386/sigaction.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/i386/sigaction.c b/libc/sysdeps/linux/i386/sigaction.c index 77da69d5e..cf6daa787 100644 --- a/libc/sysdeps/linux/i386/sigaction.c +++ b/libc/sysdeps/linux/i386/sigaction.c @@ -115,6 +115,7 @@ libc_hidden_weak(sigaction) /* The return code for realtime-signals. */ # define RESTORE2(name, syscall) \ __asm__ ( \ + "nop\n" \ ".text\n" \ "__" #name ":\n" \ " movl $" #syscall ", %eax\n" \ @@ -128,6 +129,7 @@ RESTORE(restore_rt, __NR_rt_sigreturn) # undef RESTORE2 # define RESTORE2(name, syscall) \ __asm__ ( \ + "nop\n" \ ".text\n" \ "__" #name ":\n" \ " popl %eax\n" \ |