This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/22743] __pthread_register_cancel corrupts stack after f81ddabffd
- From: "hjl.tools at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 24 Jan 2018 19:42:57 +0000
- Subject: [Bug nptl/22743] __pthread_register_cancel corrupts stack after f81ddabffd
- Auto-submitted: auto-generated
- References: <bug-22743-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22743
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
It is simple to reproduce:
1. Compile nptl/tst-cleanup1.c with glibc 2.26.
2. Link tst-cleanup1.o with glibc 2.27.
3. Run tst-cleanup1.
[hjl@gnu-6 pr22743]$ make
gcc -O2 -c -o tst-cleanup1.o tst-cleanup1.c
gcc -o tst-cleanup1 tst-cleanup1.o -lpthread
gcc -L. -nostdlib -nostartfiles -o tst-cleanup1-dynamic \
-Wl,-dynamic-linker=/export/build/gnu/glibc/build-x86_64-linux/elf/ld-linux-x86-64.so.2
\
-Wl,-z,nocombreloc \
/export/build/gnu/glibc/build-x86_64-linux/csu/crt1.o
/export/build/gnu/glibc/build-x86_64-linux/csu/crti.o \
`gcc --print-file-name=crtbegin.o` \
tst-cleanup1.o \
-Wl,-rpath=/export/build/gnu/glibc/build-x86_64-linux:/export/build/gnu/glibc/build-x86_64-linux/nptl:/usr/lib/gcc/x86_64-redhat-linux/7/../../../../lib64:.
\
\
\
/export/build/gnu/glibc/build-x86_64-linux/nptl/libpthread.so
/export/build/gnu/glibc/build-x86_64-linux/nptl/libpthread_nonshared.a \
/export/build/gnu/glibc/build-x86_64-linux/libc.so.6 \
/export/build/gnu/glibc/build-x86_64-linux/elf/ld-linux-x86-64.so.2 \
/export/build/gnu/glibc/build-x86_64-linux/libc_nonshared.a \
-Wl,-as-needed /usr/lib/gcc/x86_64-redhat-linux/7/libgcc_s.so
-Wl,--no-as-needed `gcc --print-file-name=crtend.o` \
/export/build/gnu/glibc/build-x86_64-linux/csu/crtn.o
./tst-cleanup1
ch (3)
ch (2)
ch (1)
./tst-cleanup1-dynamic
ch (3)
ch (2)
ch (1)
make: *** [Makefile:36: all] Segmentation fault
[hjl@gnu-6 pr22743]$
--
You are receiving this mail because:
You are on the CC list for the bug.