nutils-2.20.1/bin/as -v --traditional-format -V -Qy -s
-xarch=v8plus -o main.o main.s
GNU assembler version 2.20.1 (sparc-sun-solaris2.10) using BFD version (GNU
Binutils) 2.20.1.20100303
COMPILER_PATH=/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../libexec/gcc/sparc-sun-solaris2.10/4.4.3/:/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../libexec/gcc/:/usr/ccs/bin/
LIBRARY_PATH=/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../lib/gcc/sparc-sun-solaris2.10/4.4.3/:/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../lib/gcc/:/usr/ccs/lib/:/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../lib/gcc/sparc-sun-solaris2.10/4.4.3/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-o' 'main'
'-L/net/hqfs02.solipsys.com/nas/unix/users/p/s/pshakl/tests/wtf' '-mcpu=v9'
/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../libexec/gcc/sparc-sun-solaris2.10/4.4.3/collect2
-V -Y P,/usr/ccs/lib:/usr/lib -rpath-link /usr/lib -Qy -o main
/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../lib/gcc/sparc-sun-solaris2.10/4.4.3/crt1.o
/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../lib/gcc/sparc-sun-solaris2.10/4.4.3/crti.o
/usr/ccs/lib/values-Xa.o
/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../lib/gcc/sparc-sun-solaris2.10/4.4.3/crtbegin.o
-L/net/hqfs02.solipsys.com/nas/unix/users/p/s/pshakl/tests/wtf
-L/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../lib/gcc/sparc-sun-solaris2.10/4.4.3
-L/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../lib/gcc
-L/usr/ccs/lib
-L/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../lib/gcc/sparc-sun-solaris2.10/4.4.3/../../..
main.o -lfoo -lstdc++ -lm -lgcc -lc -lgcc -lc
/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../lib/gcc/sparc-sun-solaris2.10/4.4.3/crtend.o
/net/tcnsrva/export/usr/local/SunOS/5.10/sun4/gcc-4.4.3/bin/../lib/gcc/sparc-sun-solaris2.10/4.4.3/crtn.o
GNU ld (GNU Binutils) 2.20.1.20100303
Supported emulations:
elf32_sparc
elf64_sparc
Program Output:
Hello, World!zsh: segmentation fault (core dumped)
Core Backtrace:
GNU gdb (GDB) 7.1
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.10".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/net/hqfs02.solipsys.com/nas/unix/users/p/s/pshakl/tests/wtf/main...done.
[New LWP 1]
Reading symbols from
/net/hqfs02.solipsys.com/nas/unix/users/p/s/pshakl/tests/wtf/libfoo.so...done.
Loaded symbols for
/net/hqfs02.solipsys.com/nas/unix/users/p/s/pshakl/tests/wtf/libfoo.so
Reading symbols from /lib//libm.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib//libm.so.2
Reading symbols from /lib//libc.so.1...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
Loaded symbols for /lib//libc.so.1
Reading symbols from /platform/SUNW,SPARC-Enterprise/lib/libc_psr.so.1...(no
debugging symbols found)...done.
Loaded symbols for /platform/SUNW,SPARC-Enterprise/lib/libc_psr.so.1
Reading symbols from /lib/ld.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/ld.so.1
Core was generated by `./main'.
Program terminated with signal 11, Segmentation fault.
#0 0xff32bbec in std::uncaught_exception () at
../../../../gcc-4.4.3/libstdc++-v3/libsupc++/eh_catch.cc:136
136 __cxa_eh_globals *globals = __cxa_get_globals ();
(gdb) bt
#0 0xff32bbec in std::uncaught_exception () at
../../../../gcc-4.4.3/libstdc++-v3/libsupc++/eh_catch.cc:136
#1 0xff30d3ec in ~sentry (__out=..., __s=0x10968 ,
__n=13)
at
/tmp/sjlipco/gcc443obj/sparc-sun-solaris2.10/libstdc++-v3/include/ostream:408
#2 std::__ostream_insert > (__out=...,
__s=0x10968 , __n=13)
at
/tmp/sjlipco/gcc443obj/sparc-sun-solaris2.10/libstdc++-v3/include/bits/ostream_insert.h:110
#3 0xff30d764 in operator<< > (__out=..., __s=0x10968
)
at
/tmp/sjlipco/gcc443obj/sparc-sun-solaris2.10/libstdc++-v3/include/ostream:510
#4 0x000107fc in main ()
(gdb)
Additional Notes:
- I've reproduced the seg fault on a Solaris 10 x86 machine.
- I've reproduced the seg fault with g++ 4.4.1
- I've reproduced the seg fault using binutils ld version 2.19.1
- I have not been able to reproduce using g++ 4.3.3, 3.4.6, nor 3.3.2
- I have not been able to reproduce on Red Hat Enterprise Linux ES release 4
- I'm not entirely convinced this isn't a linker problem, but (at this point)
I'm unsure how to go about distinguishing.
--
Summary: cerr related segmentation fault
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: paul dot shaklan at solipsys dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43734