This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/21672] sys-libs/glibc on ia64 crashes on thread exit: signal SIGSEGV, Segmentation fault: pthread_create.c:432: __madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
- From: "slyfox at inbox dot ru" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sun, 25 Jun 2017 22:02:44 +0000
- Subject: [Bug nptl/21672] sys-libs/glibc on ia64 crashes on thread exit: signal SIGSEGV, Segmentation fault: pthread_create.c:432: __madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
- Auto-submitted: auto-generated
- References: <bug-21672-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21672
--- Comment #1 from Sergei Trofimovich <slyfox at inbox dot ru> ---
Created attachment 10221
--> https://sourceware.org/bugzilla/attachment.cgi?id=10221&action=edit
0001-fix-pthread_create-crash-in-ia64.patch
The SIGSEGV is caused by the code responsible for stack cleanup
when thread exits. madvise(MADV_DONTNEED) is called on a part of stack
activelu being used at exit.
It happens because on ia64 stack grows from both sides of stack block:
- normal "sp" stack (stack for local variables) grows down
- register stack "bsp" grows up from the opposite end of stack block
madvise(MADV_DONTNEED) effectively does memset(0) register stack
which causes SIGSEGV at address 0x8 afterwards when a pointer frop
stack is being dereferenced.
--
You are receiving this mail because:
You are on the CC list for the bug.