[Bug c++/56734] New: Even simple exceptions cause a segmentation fault in my build of gcc on Solaris 10.

marc.girod at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Mar 26 07:52:00 GMT 2013


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

             Bug #: 56734
           Summary: Even simple exceptions cause a segmentation fault in
                    my build of gcc on Solaris 10.
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marc.girod@gmail.com


Created attachment 29725
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29725
The object containing the throw and the catch

gcc version 4.7.2 (GCC) 
Target: sparc-sun-solaris2.10
Configured with: /proj/vobadm100/svn/gcc_4.7.2/configure \
  --prefix /vobs/cello/cade_A_tools_gcc \
  --with-gnu-as --with-as=/vobs/cello/cade_A_tools_utils/binutils/bin/as \
  --with-gnu-ld --with-ld=/vobs/cello/cade_A_tools_utils/binutils/bin/ld \
  --enable-threads --enable-languages=c,c++,java \
  --with-gmp=/vobs/cello/cade_A_tools_utils/gmp \
  --with-mpfr=/vobs/cello/cade_A_tools_utils/mpfr \
  --with-mpc=/vobs/cello/cade_A_tools_utils/mpc \
  --with-isl=/vobs/cello/cade_A_tools_utils/isl

The command line is:

$ ./CoreTest
Segmentation Fault

It runs a small test case reproducing the problem.
I attach the two preprocessed sources: Core.ii and CoreTest.ii.
Here is the stack trace produced by gdb:

Starting program: /home/emagiro/tmp/shex/CoreTest 
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
0xff35af84 in __frame_dummy_init_array_entry ()
   from /vobs/cello/cade_struct/lib/libstdc++.so.6
(gdb) bt
#0  0xff35af84 in __frame_dummy_init_array_entry ()
   from /vobs/cello/cade_struct/lib/libstdc++.so.6
#1  0xff2c8b48 in __cxxabiv1::__cxa_get_globals ()
    at /proj/vobadm100/svn/gcc_4.7.2/libstdc++-v3/libsupc++/eh_globals.cc:63
#2  0xff2c7a10 in __cxxabiv1::__cxa_allocate_exception (thrown_size=135552)
    at /proj/vobadm100/svn/gcc_4.7.2/libstdc++-v3/libsupc++/eh_alloc.cc:132
#3  0x00010acc in ThrowException () at Core.cc:7
#4  0x00010a90 in main () at CoreTest.cc:4

I put the main function itno a separate file, but you want only one
attachment...
The source is trivial anyway:

$ cat CoreTest.cc
#include "Core.h"

int main() {
    ThrowException();
    return 1;
}



More information about the Gcc-bugs mailing list