public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/36697]  New: SIGSEGV on program exit with gcc 4.3.1
@ 2008-07-02 15:34 benny at ammitzboell-consult dot dk
  2009-04-29 14:38 ` [Bug target/36697] " ramana at gcc dot gnu dot org
  2009-12-11 18:15 ` ramana at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: benny at ammitzboell-consult dot dk @ 2008-07-02 15:34 UTC (permalink / raw)
  To: gcc-bugs

I get SIGSEGV when my C and C++ programs exits. I have tracked it down to the
__do_global_dtors_aux function. The newly added code under HIDDEN_DTOR_LIST_END
does not check if the function ptr from the list is 0 - which the old code
below does. On my platform (no-mmu ARM, uclibc, uclinux) at least there are
zero-pointers in that __DTOR_LIST__.

This patch solved the issue for me:

--- gcc-4.3.1.org/gcc/crtstuff.c        2008-07-02 15:52:23.000000000 +0200
+++ gcc-4.3.1/gcc/crtstuff.c    2008-07-02 17:03:35.000000000 +0200
@@ -298,6 +298,7 @@
     while (dtor_idx < max_idx)
       {
        f = __DTOR_LIST__[++dtor_idx];
+       if (!f) break;
        f ();
       }
   }


-- 
           Summary: SIGSEGV on program exit with gcc 4.3.1
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: benny at ammitzboell-consult dot dk
 GCC build triplet: i386-pc-linux-gnu
  GCC host triplet: i386-pc-linux-gnu
GCC target triplet: arm-linux-uclibc


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36697


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/36697] SIGSEGV on program exit with gcc 4.3.1
  2008-07-02 15:34 [Bug c/36697] New: SIGSEGV on program exit with gcc 4.3.1 benny at ammitzboell-consult dot dk
@ 2009-04-29 14:38 ` ramana at gcc dot gnu dot org
  2009-12-11 18:15 ` ramana at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-04-29 14:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from ramana at gcc dot gnu dot org  2009-04-29 14:38 -------
The new code has a value of max_idx of DTOR_END - DTOR_LIST - 1. You might want
to see why your implementation has a value of max_idx > 1. It doesn't appear to
be a target bug yet - Please check this and get back with any more information
with a compiler of more recent vintage.


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36697


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/36697] SIGSEGV on program exit with gcc 4.3.1
  2008-07-02 15:34 [Bug c/36697] New: SIGSEGV on program exit with gcc 4.3.1 benny at ammitzboell-consult dot dk
  2009-04-29 14:38 ` [Bug target/36697] " ramana at gcc dot gnu dot org
@ 2009-12-11 18:15 ` ramana at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: ramana at gcc dot gnu dot org @ 2009-12-11 18:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from ramana at gcc dot gnu dot org  2009-12-11 18:15 -------
No feedback in more than 6 months .


-- 

ramana at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36697


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-11 18:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-02 15:34 [Bug c/36697] New: SIGSEGV on program exit with gcc 4.3.1 benny at ammitzboell-consult dot dk
2009-04-29 14:38 ` [Bug target/36697] " ramana at gcc dot gnu dot org
2009-12-11 18:15 ` ramana at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).