[prev in list] [next in list] [prev in thread] [next in thread]
List: pcc-list
Subject: RE: SIGSEGV in pcc produced executables on linux/i686.
From: "Gregory McGarry" <greg () bitlynx ! com>
Date: 2011-02-24 22:41:17
Message-ID: 20110224154117.ab62c74ef4fdac7a72bd4f4cde8f70c1.6018ef685e.wbe () email00 ! secureserver ! net
[Download RAW message or body]
<html><body><span style="font-family:Verdana; color:#000000; \
font-size:10pt;"><div>Ah, sorry. You said that you couldn't build libpcc with \
debug symbols, not that you couldn't build it.</div><div><br></div><div>It's worth \
looking into what's wrong with crtbegin.c.<br></div><div><br></div><div><br></div> \
<blockquote id="replyBlockquote" webmail="1" style="border-left: 2px solid blue; \
margin-left: 8px; padding-left: 8px; font-size: 10pt; color: black; font-family: \
verdana;"> <div id="wmQuoteWrapper">
-------- Original Message --------<br>
Subject: Re: SIGSEGV in pcc produced executables on linux/i686.<br>
From: Ramil Farkhshatov <<a \
href="mailto:ramil@gmx.co.uk">ramil@gmx.co.uk</a>><br>
Date: Thu, February 24, 2011 11:57 am<br>
To: <a href="mailto:joerg@britannica.bec.de">joerg@britannica.bec.de</a><br>
Cc: <a href="mailto:pcc-list@ludd.ltu.se">pcc-list@ludd.ltu.se</a><br>
<br>
Joerg Sonnenberger <<a \
href="mailto:joerg@britannica.bec.de">joerg@britannica.bec.de</a>> wrote:<br> <br>
> On Thu, Feb 24, 2011 at 06:26:12PM +0300, Ramil Farkhshatov wrote:<br>
> > Program received signal SIGSEGV, Segmentation fault.<br>
> > 0x00000001 in ?? ()<br>
> > (gdb) bt full<br>
> > #0 0x00000001 in ?? ()<br>
> > No symbol table info available.<br>
> > #1 0x08048307 in __do_global_ctors_aux ()<br>
><br>
> Try to disassemble the instruction here. You might hit a classic bug of<br>
> Linux in that it doesn't use SYSV ABI anymore, but requires stricter<br>
> stack aligned...<br>
<br>
Here is the disassembly:<br>
(gdb) disassemble <br>
Dump of assembler code for function __do_global_ctors_aux:<br>
0x080482b4 <+0>: push %ebp<br>
0x080482b5 <+1>: mov %esp,%ebp<br>
0x080482b7 <+3>: push %esi<br>
0x080482b8 <+4>: push %ebx<br>
0x080482b9 <+5>: cmpl $0x0,0x80494e8<br>
0x080482c0 <+12>: jne 0x804830c <__do_global_ctors_aux+88><br>
0x080482c2 <+14>: movl $0x1,0x80494e8<br>
0x080482cc <+24>: mov 0x8049400,%esi<br>
0x080482d2 <+30>: cmp $0xffffffff,%esi<br>
0x080482d5 <+33>: jne 0x80482f5 <__do_global_ctors_aux+65><br>
0x080482d7 <+35>: mov $0x1,%esi<br>
0x080482dc <+40>: cmpl $0x0,0x8049404<br>
0x080482e3 <+47>: je 0x80482f2 <__do_global_ctors_aux+62><br>
0x080482e5 <+49>: add $0x1,%esi<br>
0x080482e8 <+52>: cmpl $0x0,0x8049400(,%esi,4)<br>
0x080482f0 <+60>: jne 0x80482e5 <__do_global_ctors_aux+49><br>
0x080482f2 <+62>: sub $0x1,%esi<br>
0x080482f5 <+65>: test %esi,%esi<br>
0x080482f7 <+67>: je 0x804830c <__do_global_ctors_aux+88><br>
0x080482f9 <+69>: lea 0x8049400(,%esi,4),%ebx<br>
0x08048300 <+76>: mov (%ebx),%eax<br>
0x08048302 <+78>: sub $0x4,%ebx<br>
0x08048305 <+81>: call *%eax<br>
=> 0x08048307 <+83>: sub $0x1,%esi<br>
0x0804830a <+86>: jne 0x8048300 <__do_global_ctors_aux+76><br>
0x0804830c <+88>: pop %ebx<br>
0x0804830d <+89>: pop %esi<br>
0x0804830e <+90>: pop %ebp<br>
0x0804830f <+91>: ret <br>
End of assembler dump.<br>
(gdb) print $eax<br>
$1 = 1<br>
(gdb) print $esi<br>
$2 = 1<br>
(gdb) p/x $ebx<br>
$3 = 0x8049400<br>
(gdb) print/x *0x8049400@8<br>
$30 = {0x1, 0x1, 0xc, 0x8048234, 0xd, 0x80483dc, 0x4, 0x8048148}<br>
<br>
So I (with my limited knowledge on this matters) suspect that there is<br>
something wrong with __CTOR_LIST__ since it contains two consecutive<br>
0x00000001's.<br>
</div>
</blockquote></span></body></html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic