segfaults on amd64

Robert Millan rmh at aybabtu.com
Sun Feb 26 17:34:23 UTC 2006


On Sun, Feb 26, 2006 at 03:12:03PM +0100, Petr Salinger wrote:
> Hello Robert,
> 
> just guess, could you please test attached file instead of standard 
> sysdeps/x86_64/elf/start.S ?

Segfault again, also dependant on argv[0] length.  This time the backtrace is
a bit different though, see attached logs.

-- 
Robert Millan
-------------- next part --------------
[GDB will not be able to debug user-mode threads: /gnu/lib/libthread_db.so: Undefined symbol "ps_pdwrite"]
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
(gdb) r
Starting program: /tmp/test 

Program received signal SIGSEGV, Segmentation fault.
fixup (l=0x8006179e8, reloc_offset=Variable "reloc_offset" is not available.
) at dl-machine.h:347
347	dl-machine.h: No such file or directory.
	in dl-machine.h
(gdb) bt
#0  fixup (l=0x8006179e8, reloc_offset=Variable "reloc_offset" is not available.
) at dl-machine.h:347
#1  0x000000080050a602 in _dl_runtime_resolve () at dl-runtime.c:136
#2  0x000000000040040d in _start () at ../sysdeps/x86_64/elf/start.S:114
#3  0x00000008006179e8 in _r_debug ()
#4  0x00000008006179c0 in rtld_errno () from /lib64/ld-kfreebsd-x86-64.so.1
#5  0x000000080051462d in dots.6572 () from /lib64/ld-kfreebsd-x86-64.so.1
#6  0x0000000000500708 in __JCR_LIST__ ()
#7  0x0000000800517348 in ?? ()
[...]
-------------- next part --------------
 55829 ktrace   RET   ktrace 0
 55829 ktrace   CALL  execve(0x7fffffffe9d7,0x7fffffffe808,0x7fffffffe818)
 55829 ktrace   NAMI  "./test"
 55829 ktrace   NAMI  "/lib64/ld-kfreebsd-x86-64.so.1"
 55829 test     RET   execve 0
 55829 test     CALL  getuid
 55829 test     RET   getuid 1001/0x3e9
 55829 test     CALL  geteuid
 55829 test     RET   geteuid 1001/0x3e9
 55829 test     CALL  getgid
 55829 test     RET   getgid 1001/0x3e9
 55829 test     CALL  getegid
 55829 test     RET   getegid 1001/0x3e9
 55829 test     CALL  break(0x800618000)
 55829 test     RET   break -1 errno 12 Cannot allocate memory
 55829 test     CALL  mmap(0,0x1000,0x3,0x1002,0xffffffff,0,0)
 55829 test     RET   mmap 5337088/0x800517000
 55829 test     CALL  access(0x800511f50,0x4)
 55829 test     NAMI  "/etc/ld.so.preload"
 55829 test     RET   access -1 errno 2 No such file or directory
 55829 test     CALL  open(0x7fffffffdfd0,0,0)
 55829 test     NAMI  "/gnu/lib/tls/libc.so.0.1"
 55829 test     RET   open -1 errno 2 No such file or directory
 55829 test     CALL  stat(0x7fffffffdfd0,0x7fffffffdf38)
 55829 test     NAMI  "/gnu/lib/tls"
 55829 test     RET   stat -1 errno 2 No such file or directory
 55829 test     CALL  open(0x7fffffffdfd0,0,0)
 55829 test     NAMI  "/gnu/lib/libc.so.0.1"
 55829 test     RET   open 3
 55829 test     CALL  read(0x3,0x7fffffffe170,0x280)
 55829 test     GIO   fd 3 read 640 bytes
       0x0000 7f45 4c46 0201 0100 0000 0000 0000 0000 0300 3e00 0100 0000 20d0 0100 0000 0000 4000  |.ELF..............>..... ....... at .|
       0x0022 0000 0000 0000 f80a 8000 0000 0000 0000 0000 4000 3800 0a00 4000 5c00 5900 0600 0000  |.................. at .8...@.\.Y.....|
       0x0044 0500 0000 4000 0000 0000 0000 4000 0000 0000 0000 4000 0000 0000 0000 3002 0000 0000  |.... at .......@....... at .......0.....|
       0x0066 0000 3002 0000 0000 0000 0800 0000 0000 0000 0300 0000 0400 0000 400e 1000 0000 0000  |..0....................... at .......|
       0x0088 400e 1000 0000 0000 400e 1000 0000 0000 2100 0000 0000 0000 2100 0000 0000 0000 2000  |@....... at .......!.......!....... .|
       0x00aa 0000 0000 0000 0100 0000 0500 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000  |..................................|
       0x00cc 0000 0000 808a 1100 0000 0000 808a 1100 0000 0000 0000 1000 0000 0000 0100 0000 0600  |..................................|
       0x00ee 0000 d88b 1100 0000 0000 d88b 2100 0000 0000 d88b 2100 0000 0000 0852 0000 0000 0000  |............!.......!......R......|
       0x0110 1094 0000 0000 0000 0000 1000 0000 0000 0200 0000 0600 0000 60ba 1100 0000 0000 60ba  |........................`.......`.|
       0x0132 2100 0000 0000 60ba 2100 0000 0000 d001 0000 0000 0000 d001 0000 0000 0000 0800 0000  |!.....`.!.........................|
       0x0154 0000 0000 0400 0000 0400 0000 7002 0000 0000 0000 7002 0000 0000 0000 7002 0000 0000  |............p.......p.......p.....|
       0x0176 0000 2000 0000 0000 0000 2000 0000 0000 0000 0400 0000 0000 0000 0700 0000 0400 0000  |.. ....... .......................|
       0x0198 d88b 1100 0000 0000 d88b 2100 0000 0000 d88b 2100 0000 0000 1000 0000 0000 0000 5000  |..........!.......!.............P.|
       0x01ba 0000 0000 0000 0800 0000 0000 0000 50e5 7464 0400 0000 640e 1000 0000 0000 640e 1000  |..............P.td....d.......d...|
       0x01dc 0000 0000 640e 1000 0000 0000 544f 0000 0000 0000 544f 0000 0000 0000 0400 0000 0000  |....d.......TO......TO............|
       0x01fe 0000 51e5 7464 0600 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000  |..Q.td............................|
       0x0220 0000 0000 0000 0000 0000 0000 0000 0000 0800 0000 0000 0000 52e5 7464 0400 0000 d88b  |........................R.td......|
       0x0242 1100 0000 0000 d88b 2100 0000 0000 d88b 2100 0000 0000 2834 0000 0000 0000 2834 0000  |........!.......!.....(4......(4..|
       0x0264 0000 0000 0100 0000 0000 0000 0400 0000 1000 0000 0100 0000 474e 5500                 |........................GNU.|

 55829 test     RET   read 640/0x280
 55829 test     CALL  lseek(0x3,0,0x270,0)
 55829 test     RET   lseek 624/0x270
 55829 test     CALL  read(0x3,0x7fffffffdf68,0x20)
 55829 test     GIO   fd 3 read 32 bytes
       0x0000 0400 0000 1000 0000 0100 0000 474e 5500 0300 0000 0500 0000 0400 0000 0000 0000       |............GNU.................|

 55829 test     RET   read 32/0x20
 55829 test     CALL  fstat(0x3,0x7fffffffdf18)
 55829 test     RET   fstat 0
 55829 test     CALL  mmap(0,0x221fe8,0x5,0x2,0x3,0,0)
 55829 test     RET   mmap 6389760/0x800618000
 55829 test     CALL  pread(0x3,0x7fffffffdd7f,0x1,0,0)
 55829 test     GIO   fd 3 read 1 byte
       0x0000 7f                                                                                    |.|

 55829 test     RET   pread 1
 55829 test     CALL  mprotect(0x800731000,0x108fe8,0)
 55829 test     RET   mprotect 0
 55829 test     CALL  __sysctl(0x7fffffffdd38,0x2,0x800617988,0x7fffffffdd30,0,0)
 55829 test     RET   __sysctl 0
 55829 test     CALL  mmap(0x800830000,0x6000,0x3,0x12,0x3,0,0x118000)
 55829 test     RET   mmap 8585216/0x800830000
 55829 test     CALL  pread(0x3,0x7fffffffdd7f,0x1,0,0x118000)
 55829 test     GIO   fd 3 read 1 byte
       "0"
 55829 test     RET   pread 1
 55829 test     CALL  mmap(0x800836000,0x3fe8,0x3,0x1012,0xffffffff,0,0)
 55829 test     RET   mmap 8609792/0x800836000
 55829 test     CALL  close(0x3)
 55829 test     RET   close 0
 55829 test     CALL  mmap(0,0x1000,0x3,0x1002,0xffffffff,0,0)
 55829 test     RET   mmap 5341184/0x800518000
 55829 test     CALL  mprotect(0x800830000,0x4000,0x1)
 55829 test     RET   mprotect 0
 55829 test     CALL  mprotect(0x800616000,0x1000,0x1)
 55829 test     RET   mprotect 0
 55829 test     CALL  sysarch(0x81,0x7fffffffe710)
 55829 test     RET   sysarch 0
 55829 test     PSIG  SIGSEGV SIG_DFL
 55829 test     NAMI  "test.core"


More information about the Glibc-bsd-devel mailing list