Message ID | 1400604775-20602-1-git-send-email-glen4linux@gmail.com |
---|---|
State | Superseded |
Headers | show |
On Wed, May 21, 2014 at 12:52:55AM +0800, ZhangPu wrote: > When x86_64 cpu contains 'cpu_has_xsave' flag(in kernel),call the > pthread_cancel will have a segmentation fault. Because gcc could > not find the end of stack in user signal stack. How ugly.. Applied, thanks!
diff --git a/libc/sysdeps/linux/x86_64/sigaction.c b/libc/sysdeps/linux/x86_64/sigaction.c index 703b24c..229e1a9 100644 --- a/libc/sysdeps/linux/x86_64/sigaction.c +++ b/libc/sysdeps/linux/x86_64/sigaction.c @@ -116,6 +116,7 @@ libc_hidden_weak(sigaction) #define RESTORE(name, syscall) RESTORE2(name, syscall) #define RESTORE2(name, syscall) \ __asm__ ( \ + " nop\n" \ ".text\n" \ "__" #name ":\n" \ " movq $" #syscall ", %rax\n" \
When x86_64 cpu contains 'cpu_has_xsave' flag(in kernel),call the pthread_cancel will have a segmentation fault. Because gcc could not find the end of stack in user signal stack. Signed-off-by: ZhangPu <glen4linux@gmail.com> --- libc/sysdeps/linux/x86_64/sigaction.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)