[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.&nbsp; 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 &lt;<a \
                href="mailto:ramil@gmx.co.uk">ramil@gmx.co.uk</a>&gt;<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 &lt;<a \
href="mailto:joerg@britannica.bec.de">joerg@britannica.bec.de</a>&gt; wrote:<br> <br>
&gt; On Thu, Feb 24, 2011 at 06:26:12PM +0300, Ramil Farkhshatov wrote:<br>
&gt; &gt;   Program received signal SIGSEGV, Segmentation fault.<br>
&gt; &gt;   0x00000001 in ?? ()<br>
&gt; &gt;   (gdb) bt full<br>
&gt; &gt;   #0  0x00000001 in ?? ()<br>
&gt; &gt;   No symbol table info available.<br>
&gt; &gt;   #1  0x08048307 in __do_global_ctors_aux ()<br>
&gt;<br>
&gt; Try to disassemble the instruction here. You might hit a classic bug of<br>
&gt; Linux in that it doesn't use SYSV ABI anymore, but requires stricter<br>
&gt; stack aligned...<br>
<br>
Here is the disassembly:<br>
(gdb) disassemble <br>
Dump of assembler code for function __do_global_ctors_aux:<br>
   0x080482b4 &lt;+0&gt;:     push   %ebp<br>
   0x080482b5 &lt;+1&gt;:     mov    %esp,%ebp<br>
   0x080482b7 &lt;+3&gt;:     push   %esi<br>
   0x080482b8 &lt;+4&gt;:     push   %ebx<br>
   0x080482b9 &lt;+5&gt;:     cmpl   $0x0,0x80494e8<br>
   0x080482c0 &lt;+12&gt;:    jne    0x804830c &lt;__do_global_ctors_aux+88&gt;<br>
   0x080482c2 &lt;+14&gt;:    movl   $0x1,0x80494e8<br>
   0x080482cc &lt;+24&gt;:    mov    0x8049400,%esi<br>
   0x080482d2 &lt;+30&gt;:    cmp    $0xffffffff,%esi<br>
   0x080482d5 &lt;+33&gt;:    jne    0x80482f5 &lt;__do_global_ctors_aux+65&gt;<br>
   0x080482d7 &lt;+35&gt;:    mov    $0x1,%esi<br>
   0x080482dc &lt;+40&gt;:    cmpl   $0x0,0x8049404<br>
   0x080482e3 &lt;+47&gt;:    je     0x80482f2 &lt;__do_global_ctors_aux+62&gt;<br>
   0x080482e5 &lt;+49&gt;:    add    $0x1,%esi<br>
   0x080482e8 &lt;+52&gt;:    cmpl   $0x0,0x8049400(,%esi,4)<br>
   0x080482f0 &lt;+60&gt;:    jne    0x80482e5 &lt;__do_global_ctors_aux+49&gt;<br>
   0x080482f2 &lt;+62&gt;:    sub    $0x1,%esi<br>
   0x080482f5 &lt;+65&gt;:    test   %esi,%esi<br>
   0x080482f7 &lt;+67&gt;:    je     0x804830c &lt;__do_global_ctors_aux+88&gt;<br>
   0x080482f9 &lt;+69&gt;:    lea    0x8049400(,%esi,4),%ebx<br>
   0x08048300 &lt;+76&gt;:    mov    (%ebx),%eax<br>
   0x08048302 &lt;+78&gt;:    sub    $0x4,%ebx<br>
   0x08048305 &lt;+81&gt;:    call   *%eax<br>
=&gt; 0x08048307 &lt;+83&gt;:    sub    $0x1,%esi<br>
   0x0804830a &lt;+86&gt;:    jne    0x8048300 &lt;__do_global_ctors_aux+76&gt;<br>
   0x0804830c &lt;+88&gt;:    pop    %ebx<br>
   0x0804830d &lt;+89&gt;:    pop    %esi<br>
   0x0804830e &lt;+90&gt;:    pop    %ebp<br>
   0x0804830f &lt;+91&gt;:    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