This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

hello world crashes with gcc-3.0.2, solaris2.6


Hi,
We have two possibly related problems with gcc on solaris2.6. (the same
tests worked without a problem on solaris2.8)

problem 1:
When we configure gcc to use GNU binutils (2.11.2), gcc builds fine,
but even a simple hello-world program crashes with a core dump.
BTW, the same hello-world works fine if gcc is configured with the native ld,as tools
(problem 2: see my separate mail)

Any suggestions are greatly welcomed!



$ g++ -v
Reading specs from
/view_storage/chris/local/lib/gcc-lib/sparc-sun-solaris2.6/3.0.2/specs
Configured with: ../gcc-3.0.2/configure --prefix=/chris/local --enable-threads
--with-ld=/view_storage/chris/local/bin/ld
--with-as=/view_storage/chris/local/bin/as --with-gnu-as --with-gnu-ld
--with-gcc --enable-languages=c++
Thread model: posix
gcc version 3.0.2

Hello.cxx:
-------------------------------
#include <iostream>
using namespace std;
int main() { cout << "Hello" << endl; return 0; }
-------------------------------


(gdb) numsu(chris)/view_storage/chris/gccTest$ gdb a.out core       
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.6"...
Core was generated by `./a.out'.
Program terminated with signal 11, Segmentation Fault.
Reading symbols from /view_storage/chris/local/lib/libstdc++.so.3...done.
Loaded symbols for /view_storage/chris/local/lib/libstdc++.so.3
Reading symbols from /usr/lib/libm.so.1...done.
Loaded symbols for /usr/lib/libm.so.1
Reading symbols from /view_storage/chris/local/lib/libgcc_s.so.1...done.
Loaded symbols for /view_storage/chris/local/lib/libgcc_s.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1...done.
Loaded symbols for /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
#0  0x76d0dc in ?? ()
(gdb) where
#0  0x76d0dc in ?? ()
#1  0x13248 in _ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc (this=0x26004, __c=32 ' ')
    at /view_storage/chris/local/include/g++-v3/bits/basic_ios.tcc:99
#2  0xef783e48 in _ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E (
    this=0x26004, __sb=0xef7aafc8)
    at /view_storage/chris/gcc-obj/sparc-sun-solaris2.6/libstdc++-v3/include/bits/basic_ios.tcc:
122
#3  0xef76b4b4 in _ZNSt8ios_base4Init13_S_ios_createEb (__sync=false)
    at /view_storage/chris/gcc-obj/sparc-sun-solaris2.6/libstdc++-v3/include/bits/std_ostream.h:
67
#4  0xef76b7d4 in _ZNSt8ios_base4InitC1Ev (this=0x260ab)
    at ../../../../gcc-3.0.2/libstdc++-v3/src/ios.cc:203
#5  0x125c4 in _Z41__static_initialization_and_destruction_0ii (__initialize_p=1, 
    __priority=65535) at /view_storage/chris/local/include/g++-v3/bits/locale_facets.tcc:57
#6  0x12744 in _GLOBAL__I_main ()
    at /view_storage/chris/local/include/g++-v3/bits/locale_facets.tcc:75
#7  0x127c4 in __do_global_ctors_aux ()
    at /view_storage/chris/local/include/g++-v3/bits/locale_facets.tcc:75
#8  0x12220 in _init ()
(gdb) 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]