[PATCH] fix pthread_cancel lead to segmentation fault for x86_64.
ZhangPu
glen4linux at gmail.com
Tue May 20 16:52:55 UTC 2014
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 at gmail.com>
---
libc/sysdeps/linux/x86_64/sigaction.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
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" \
--
1.7.1
More information about the uClibc
mailing list