You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Martin Sebor <se...@roguewave.com> on 2006/06/05 20:39:35 UTC
Re: io test seg faults
Scott Zhong wrote:
> http://issues.apache.org/jira/browse/STDCXX-196
I'm not sure what's going on yet but I have been able to reproduce
the behavior in a fairly small test case (but not independent of
stdcxx). Somehow, rethrowing the caught exception causes the fault.
$ cat t.cpp && nice make t && ./t || gdb64 -q t
#include <sstream>
int main ()
{
std::istringstream strm ("");
strm.exceptions (strm.eofbit | strm.failbit);
try {
try {
strm.get ();
}
catch (...) {
throw;
}
}
catch (...) {
return 0;
}
return 1;
}
xlc_r -c -I/amd/devco/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG
-D_RWSTD_USE_CONFIG -I/amd/devco/sebor/dev/stdlib/include
-I/build/sebor/xlc-8.0-15S/include
-I/amd/devco/sebor/dev/stdlib/../rwtest
-I/amd/devco/sebor/dev/stdlib/../rwtest/include
-I/amd/devco/sebor/dev/stdlib/tests/include
-F/package/1/ppc64/compilers/ibm/va80/vac.cfg -g -q64
-qtemplateregistry=t.ti t.cpp
xlc_r t.o -o t -L/build/sebor/xlc-8.0-15S/rwtest -lrwtest15S
-F/package/1/ppc64/compilers/ibm/va80/vac.cfg
-I/amd/devco/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG
-D_RWSTD_USE_CONFIG -q64 -I/amd/devco/sebor/dev/stdlib/include/ansi
-D_RWSTDDEBUG -D_RWSTD_USE_CONFIG
-I/amd/devco/sebor/dev/stdlib/include -I/build/sebor/xlc-8.0-15S/include
-I/amd/devco/sebor/dev/stdlib/../rwtest
-I/amd/devco/sebor/dev/stdlib/../rwtest/include
-I/amd/devco/sebor/dev/stdlib/tests/include -qtemplateregistry=.ti
-L/build/sebor/xlc-8.0-15S/lib -lstd15S -lxlopt -lxl -libmc++ -lsupc++
-lgcc -lgcc_eh -lc -lm
Segmentation fault
Using host libthread_db library "/lib64/tls/libthread_db.so.1".
(gdb) run
Starting program: /build/sebor/xlc-8.0-15S/tests/t
[Thread debugging using libthread_db enabled]
[New Thread 549758541856 (LWP 14003)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 549758541856 (LWP 14003)]
main () at t.cpp:13
13 catch (...) {
(gdb) where
#0 main () at t.cpp:13