segfaults on amd64

Robert Millan rmh at aybabtu.com
Sun Feb 26 12:01:44 UTC 2006


On Sat, Feb 25, 2006 at 09:08:33PM +0100, Petr Salinger wrote:
> Robert, 
> 
> can you please also try 
> 
> LD_SHOW_AUXV=all /lib/ld-kfreebsd-x86-64.so.1

$ LD_SHOW_AUXV=all /lib/ld-kfreebsd-x86-64.so.1
AT_PHDR:         0x40
AT_PHENT:        56
AT_PHNUM:        6
AT_PAGESZ:       4096
AT_FLAGS:        0x0
AT_ENTRY:        0xca0
AT_BASE:         0x800116000
Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked `ld.so', the helper program for shared library executables.
[...]

> LD_SHOW_AUXV=all ./test

$ LD_SHOW_AUXV=all ./test
AT_PHDR:         0x400040
AT_PHENT:        56
AT_PHNUM:        8
AT_PAGESZ:       4096
AT_FLAGS:        0x0
AT_ENTRY:        0x4003e0
AT_BASE:         0x800500000
argc = 1
argv[0] = ./test

> LD_SHOW_AUXV=all ./test_with_long_filename 

$ LD_SHOW_AUXV=all .//////test
Segmentation fault (core dumped)

$ ./test
Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked `ld.so', the helper program for shared library executables.
[...]

$ .////////test
Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked `ld.so', the helper program for shared library executables.
[...]

# note, "gdb ./test" produced same result as "gdb .////////test"
$ LD_SHOW_AUXV=all gdb ./test
[...]
(gdb) r
Starting program: /tmp/test

Program received signal SIGSEGV, Segmentation fault.
0x00000008006843d0 in strchr () from /gnu/lib/libc.so.0.1
(gdb) bt
#0  0x00000008006843d0 in strchr () from /gnu/lib/libc.so.0.1
#1  0x0000000800684f81 in *__GI_strrchr (s=Variable "s" is not available.
) at ../sysdeps/generic/strrchr.c:37
#2  0x00000008006cedfb in __init_misc (argc=Variable "argc" is not available.
) at init-misc.c:34
#3  0x0000000800634eb9 in init (argc=0, argv=0x7fffffffe7f0, envp=0x7fffffffe7f8) at ../sysdeps/unix/bsd/bsd4.4/kfreebsd/init-first.c:83
#4  0x000000080050ad6b in call_init (l=0x800517338, argc=0, argv=0x7fffffffe7f0, env=0x7fffffffe7f8) at dl-init.c:70
#5  0x000000080050aeaf in _dl_init (main_map=0x8006179e8, argc=0, argv=0x7fffffffe7f0, env=0x7fffffffe7f8) at dl-init.c:142
#6  0x0000000800500cdb in _dl_start_user () at rtld.c:579
#7  0x0000000800500ca8 in _start () at rtld.c:579

-- 
Robert Millan



More information about the Glibc-bsd-devel mailing list