From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/944 Path: news.gmane.org!not-for-mail From: aep Newsgroups: gmane.linux.lib.musl.general Subject: hm, libc crashes loading libc Date: Sat, 02 Jun 2012 00:18:55 +0200 Message-ID: <9ab5e7d10a265901c54f6f71443a26f4@exys.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1338588970 2915 80.91.229.3 (1 Jun 2012 22:16:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 1 Jun 2012 22:16:10 +0000 (UTC) To: Original-X-From: musl-return-945-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jun 02 00:16:10 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Saa8g-0003kt-0q for gllmg-musl@plane.gmane.org; Sat, 02 Jun 2012 00:16:10 +0200 Original-Received: (qmail 7270 invoked by uid 550); 1 Jun 2012 22:16:09 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 7262 invoked from network); 1 Jun 2012 22:16:09 -0000 X-Sender: aep@exys.org User-Agent: Roundcube Webmail/0.5.4 Xref: news.gmane.org gmane.linux.lib.musl.general:944 Archived-At: with git 9ea20dcbaafe790bb034adadf05698088a2f9fab this stuff scares me, so i'll just dump the relevant information, hoping someone knows what to do with it. aep@nightbringer: /tmp echo "int main() {} " | musl-gcc -x c++ - aep@nightbringer: /tmp ./a.out zsh: segmentation fault ./a.out #0 find_sym (dso=0x7ffff7ff8a00, s=s@entry=0x7ffff7d7801d "__cgt", need_def=0) at src/ldso/dynlink.c:131 #1 0x00007ffff7d811a0 in do_relocs (dso=0x7ffff7ff8a00, strings=0x7ffff7d74d50 "", syms=0x7ffff7d6bdc8, rel_size=624, rel=0x7ffff7d786e8, base=0x7ffff7d69000 "\177ELF\002\001\001", stride=) at src/ldso/dynlink.c:161 #2 reloc_all (p=p@entry=0x7ffff7ff8a80) at src/ldso/dynlink.c:481 #3 0x00007ffff7d82667 in __dynlink (argc=, argv=) at src/ldso/dynlink.c:643 #4 0x00007ffff7d831e2 in _start () at src/ldso/x86_64/start.s:6 #5 0x0000000000000001 in ?? () #6 0x00007fffffffe77e in ?? () #7 0x0000000000000000 in ?? () reakpoint 1, reloc_all (p=p@entry=0x7ffff7ff8a80) at src/ldso/dynlink.c:472 472 { (gdb) print p $1 = (struct dso *) 0x7ffff7ff8a80 (gdb) p p->name $3 = 0x7ffff7dcc012 "libc.so" (gdb) step Program received signal SIGSEGV, Segmentation fault. find_sym (dso=0x7ffff7ff8a00, s=s@entry=0x7ffff7d7801d "__cgt", need_def=0) at src/ldso/dynlink.c:131 131 sym = lookup(s, h, dso->syms, dso->hashtab, dso->strings); (gdb) print dso $2 = (struct dso *) 0x7ffff7ff8a00 (gdb) step lookup (strings=0x400308 "", hashtab=0x0, syms=0x400278, h=6642148, s=0x7ffff7d7801d "__cgt") at src/ldso/dynlink.c:111 111 for (i=hashtab[2+h%hashtab[0]]; i; i=hashtab[2+hashtab[0]+i]) { (gdb) step Program terminated with signal SIGSEGV, Segmentation fault. The program no longer exists. (gdb) hashtab=0x0 sounds wrong, but how did it become zero?