This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/6728] abort() seg faults when statically linked in glibc-2.7
- From: "halesh dot s at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 8 Jul 2008 13:44:52 -0000
- Subject: [Bug libc/6728] abort() seg faults when statically linked in glibc-2.7
- References: <20080708115559.6728.shal1783@gmail.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From halesh dot s at gmail dot com 2008-07-08 13:44 -------
(In reply to comment #4)
> I see no problem. It must be either old code or an incorrect build on your
side.
Hi,
I checked this testcode against gilbc 2.3, 2.5 and 2.7
Please check the below o/p
$ gcc -g -static -L /home/halesh/glibc-2.5/usr/lib abort_t.c
Aborted
$ gcc -g -static -L /home/halesh/glibc-2.7/usr/lib abort_t.c
Segmentation fault
$ gcc -g static abort_t.c <- glibc-2.3
Aborted
When i went still more deep..
GDB O/P for glibc-2.7
-----------------------
.................
.................
raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:34
34 pid_t pid = THREAD_GETMEM (pd, pid);
(gdb)
36 pid_t selftid = THREAD_GETMEM (pd, tid);
(gdb)
37 if (selftid == 0)
(gdb)
67 int res = INLINE_SYSCALL (tgkill, 3, THREAD_GETMEM(pd, pid), selftid,
sig);
(gdb)
68 if (res != -1 || errno != ENOSYS)
(gdb)
69 return res;
(gdb)
73 }
(gdb)
abort () at abort.c:121
121 if (stage == 6)
(gdb)
123 ++stage;
(gdb)
124 ABORT_INSTRUCTION;
(gdb)
Program received signal SIGSEGV, Segmentation fault.
abort () at abort.c:124
124 ABORT_INSTRUCTION;
........................
........................
GDB O/P for glibc-2.5
-----------------------
.................
.................
raise (sig=0) at ../nptl/sysdeps/unix/sysv/linux/raise.c:31
31 {
(gdb)
34 pid_t pid = THREAD_GETMEM (pd, pid);
(gdb)
36 pid_t selftid = THREAD_GETMEM (pd, tid);
(gdb)
37 if (selftid == 0)
(gdb)
42 selftid = INTERNAL_SYSCALL (gettid, err, 0);
(gdb)
46 THREAD_SETMEM (pd, tid, selftid);
(gdb)
51 pid = selftid;
(gdb)
64 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb)
Program received signal SIGABRT, Aborted.
..............................
..............................
There is difference in raise.c, is it old code in 2.7?
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6728
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.