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

2013-03-26 Thread marc.girod at gmail dot com


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: unassig...@gcc.gnu.org

ReportedBy: marc.gi...@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;

}


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

2013-03-26 Thread marc.girod at gmail dot com


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



--- Comment #1 from Marc Girod  2013-03-26 
07:53:46 UTC ---

Created attachment 29726

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29726

the main function


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

2013-03-26 Thread marc.girod at gmail dot com


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



--- Comment #3 from Marc Girod  2013-03-27 
06:52:14 UTC ---

OK. Good to know. I configured with GNU, hence there is something in the tool

chain which results in the problem.

Under the debugger, I get the segfault stepping into the call to 'get_global()'

in libstdc++-v3/libsupc++/eh_globals.cc:63.

I can find only one declaration of this get_global, and it is earlier in

eh_globals.cc:50.

Looking at the decorations in the symbols:



gcc> nm ./sparc-sun-solaris2.10/libstdc++-v3/libsupc++/eh_globals.o

 U _GLOBAL_OFFSET_TABLE_

 d _ZL16__gthread_active

 b _ZZN12_GLOBAL__N_110get_globalEvE6global

 T __cxa_get_globals

 T __cxa_get_globals_fast

 W __sparc_get_pc_thunk.l7

 U __tls_get_addr



I wonder if there is a mismatch between the offering and the request?

What symbols do you have, in the Sun configuration?

Note that I was handed another gcc, compiled independently for the same

platform, and which displays the same issue.


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

2013-03-27 Thread marc.girod at gmail dot com


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



--- Comment #4 from Marc Girod  2013-03-27 
07:00:33 UTC ---

Sorry: the other compiler works once I set LD_LIBRARY_PATH to use its

libstdc++.so.6 and libgcc_s.so.1


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

2013-03-29 Thread marc.girod at gmail dot com


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



--- Comment #6 from Marc Girod  2013-03-29 
08:39:38 UTC ---

I can acknowledge that installing binutils 2.23.2 solved my problem with gcc

4.7.2


[Bug c/52017] New: internal compiler error: Segmentation fault in compiling Perl Tk on Cygwin

2012-01-27 Thread marc.girod at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52017

 Bug #: 52017
   Summary: internal compiler error: Segmentation fault in
compiling Perl Tk on Cygwin
Classification: Unclassified
   Product: gcc
   Version: 4.5.3
Status: UNCONFIRMED
  Severity: critical
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: marc.gi...@gmail.com


Created attachment 26478
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26478
pre-processed file the compilation of which produces the error

Compiling Perl Tk-804.030 (from CPAN)

pTk> uname -srvp
CYGWIN_NT-6.0 1.7.9(0.237/5/3) 2011-03-29 10:10 unknown
pTk> gcc-4 --version
gcc-4 (GCC) 4.5.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
pTk> cygcheck -c gcc4-core
Cygwin Package Information
Package  VersionStatus
gcc4-core4.5.3-3OK


pTk> gcc-4 -c -save-temps  -I..  -I. -Ibitmaps   -DPERL_USE_SAFE_PUTENV
-U__STRICT_ANSI__ -g3 -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -DUSEIMPORTLIB -O3-DVERSION=\"804.03\" 
-DXS_VERSION=\"804.03\"  "-I/usr/lib/perl5/5.10/i686-cygwin/CORE"  -U_WIN32
-DWINARCH_X -Wall -Wno-implicit-int -Wno-comment -Wno-unused
-D__USE_FIXED_PROTOTYPES__ imgBMP.c
gcc-4: warning: -pipe ignored because -save-temps specified
imgBMP.c: In function ‘CommonReadBMP’:
imgBMP.c:242:2: warning: pointer targets in passing argument 2 of ‘ImgRead’
differ in signedness
imgInt.h:53:12: note: expected ‘char *’ but argument is of type ‘unsigned char
*’
imgBMP.c:256:3: warning: pointer targets in passing argument 2 of ‘ImgRead’
differ in signedness
imgInt.h:53:12: note: expected ‘char *’ but argument is of type ‘unsigned char
*’
imgBMP.c:264:3: warning: pointer targets in passing argument 2 of ‘ImgRead’
differ in signedness
imgInt.h:53:12: note: expected ‘char *’ but argument is of type ‘unsigned char
*’
imgBMP.c:278:3: warning: pointer targets in passing argument 2 of ‘ImgRead’
differ in signedness
imgInt.h:53:12: note: expected ‘char *’ but argument is of type ‘unsigned char
*’
imgBMP.c:297:3: warning: pointer targets in passing argument 2 of ‘ImgRead’
differ in signedness
imgInt.h:53:12: note: expected ‘char *’ but argument is of type ‘unsigned char
*’
imgBMP.c: In function ‘CommonWriteBMP’:
imgBMP.c:503:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.