Public bug reported:
Hi
While building qemu statically, I get a SEGV on startup when it calls
getaddrinfo() for the VNC listener; it turns out this is easily
reproducible with a small C test case when building statically.
gcc -O0 -o foo foo.c && ./foo
=> works
gcc -static -O0 -o foo foo.c && ./foo
=> segvs
(gdb) run
Starting program: /home/lool/foo
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ac79e3 in arena_get2 (a_tsd=0x7ffff7dcde40, size=100)
at arena.c:1072
1072 arena.c: Aucun fichier ou dossier de ce type.
in arena.c
(gdb) bt
#0 0x00007ffff7ac79e3 in arena_get2 (a_tsd=0x7ffff7dcde40, size=100)
at arena.c:1072
#1 0x00007ffff7acb53f in __libc_malloc (bytes=100) at malloc.c:3672
#2 0x00007ffff7abb1c9 in _IO_vasprintf (result_ptr=0x7fffffffdc68,
format=0x64 <Address 0x64 out of bounds>, args=0x0) at vasprintf.c:52
#3 0x00007ffff7a9f8b8 in ___asprintf (string_ptr=0x0,
format=0x64 <Address 0x64 out of bounds>) at asprintf.c:37
#4 0x00007ffff7a7ba33 in __assert_fail (
assertion=0x7ffff7b9c6d8 "_rtld_global_ro._dl_pagesize != 0",
file=<value optimised out>, line=32,
function=0x7ffff7b97acd "__getpagesize") at assert.c:63
#5 0x00007ffff7b2e0c8 in __getpagesize ()
at ../sysdeps/unix/sysv/linux/getpagesize.c:32
#6 0x00007ffff7ac6d72 in ptmalloc_init_minimal () at arena.c:415
#7 ptmalloc_init () at arena.c:485
#8 0x00007ffff7acb5d7 in malloc_hook_ini (sz=0, caller=0x64) at hooks.c:37
#9 0x00007ffff7ab73ab in __fopen_internal (
filename=0x7ffff7ddc4f0 "/etc/hosts",
mode=0x64 <Address 0x64 out of bounds>, is32=0)
at ../sysdeps/wordsize-64/../../libio/iofopen.c:76
#10 0x00007ffff7dd71e3 in internal_setent (stayopen=0)
at nss_files/files-XXX.c:80
#11 0x00007ffff7dd7a1c in _nss_files_gethostbyname4_r (
name=<value optimised out>, pat=0x64, buffer=0x7fffffffde60 "",
buflen=1024, errnop=0x1, herrnop=0x0, ttlp=0x0)
at nss_files/files-hosts.c:329
#12 0x000000000040e3d6 in gaih_inet ()
#13 0x0000000000410062 in getaddrinfo ()
#14 0x00000000004004a5 in main ()
Cheers,
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: libc6 2.12.1-0ubuntu6
ProcVersionSignature: Ubuntu 2.6.35-20.29-generic 2.6.35.4
Uname: Linux 2.6.35-20-generic x86_64
Architecture: amd64
Date: Sat Sep 25 16:25:19 2010
ProcEnviron:
LANGUAGE=fr_FR:fr:en_GB:en
PATH=(custom, user)
LANG=fr_FR.UTF-8
SHELL=/bin/zsh
SourcePackage: eglibc
** Affects: eglibc (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug maverick
--
getaddrinfo() segfaults when linked statically
https://bugs.launchpad.net/bugs/647527
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs