You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@stdcxx.apache.org by "Eric Lemings (JIRA)" <ji...@apache.org> on 2008/06/04 22:57:44 UTC

[jira] Updated: (STDCXX-196) [XLC++ 8.0/SLES 9.2] SIGSEGV in .__cxa_get_globals_fast throwing an exception

     [ https://issues.apache.org/jira/browse/STDCXX-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Lemings updated STDCXX-196:
--------------------------------

    Component/s:     (was: TR1.6 - Containers)
                 23. Containers

I think this issue has more to do with existing containers than TR1 containers.

> [XLC++ 8.0/SLES 9.2] SIGSEGV in .__cxa_get_globals_fast throwing an exception
> -----------------------------------------------------------------------------
>
>                 Key: STDCXX-196
>                 URL: https://issues.apache.org/jira/browse/STDCXX-196
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 19. Diagnostics, 23. Containers, 27. Input/Output
>    Affects Versions: 4.1.3
>         Environment: SuSE SLES 9sp2 (ppc64), IBM XL C/C++ Advanced Edition V8.0 for Linux 
> Version: 08.00.0000.0000 
>            Reporter: Scott (Yu) Zhong
>             Fix For: 4.3
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> I'm working on a problem with tests/stdlib/string/io.cpp, it is seg faulting at exception.cpp. I noticed when I used gdb64 to debug it, it would call "throw (__rw_failure&)" twice in the __rw_throw_exception function.  Can this be the cause of seg fault? When it calls throw twice?  
> Looking at other failed stdlib test causes me to think .__cxa_get_globals_fast () in libsupc++ is the most likely cause of segmentation faults in those test. (See gdb64 outputs)
> affected tests so far:
> tests/stdlib/containers/bitset_io
> tests/stdlib/containers/vector_modifiers
> tests/stdlib/iostream/istream_manip
> tests/stdlib/string/io
> ------------ gdb64 of tests/stdlib/string/io ----------------------
> Breakpoint 11, test_extractor<char> (t=@0x1ffffffe3b0, line=646, init_state=__rw_goodbit, flags=__rw_skipws, width=0, str=0x100a13e8 "", 
>     consumed=0, expect_str=0x0, expect_state=__rw_eof_fail) at io.cpp:414
> 414                 istrm2 >> val;
> (more code in between) 
> __rw::__rw_throw_exception (id=17, what=0x100fb480 "user-defined: stream object has set failbit, eofbit") at exception.cpp:646
> 646     {
> (gdb) n
> 655         switch (id) {
> (gdb) 
> 732             throw (__rw_failure&)
> (gdb) 
> 733                 __rw_failure ()._C_assign (what, 0);
> (gdb) 
> 732             throw (__rw_failure&)
> (gdb) 
> (gdb) run
> Starting program: /build/scottz/ed9/tests/stdlib/string/stdlib_rs/io 
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000010097148 in .__cxa_get_globals_fast ()
> (gdb) where
> #0  0x0000000010097148 in .__cxa_get_globals_fast ()
> #1  0x0000000010096c58 in .__cxa_end_catch ()
> #2  0x000000001000f390 in std::operator>><char, std::char_traits<char>, std::allocator<char> > (__is=@0x1ffffffd930, __str=@0x1ffffffd628)
>     at istream.cc:847
> #3  0x00000000100121f8 in test_extractor<char> (t=@0x1ffffffe3b0, line=646, init_state=__rw_goodbit, flags=__rw_skipws, width=0, 
>     str=0x100a13e8 "", consumed=0, expect_str=0x0, expect_state=__rw_eof_fail) at io.cpp:414
> #4  0x0000000010027d84 in test_extractor<char> (t=@0x1ffffffe3b0) at io.cpp:646
> #5  0x000000001002830c in Test::runTest (this=0x1ffffffe3b0) at io.cpp:1279
> #6  0x000000001003e300 in RWQETest::go (this=0x1ffffffe3b0) at rwtest.cpp:857
> #7  0x00000000100233b0 in main (argc=1, argv=0x1ffffffea08) at io.cpp:1301
> ---------------- gdb64 of tests/stdlib/containers/bitset_io ----------------------
> (gdb) run
> Starting program: /build/scottz/ed9/tests/stdlib/containers/stdlib_rs/bitset_io 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00000000100b8c68 in .__cxa_get_globals_fast ()
> (gdb) where
> #0  0x00000000100b8c68 in .__cxa_get_globals_fast ()
> #1  0x00000000100b8778 in .__cxa_end_catch ()
> #2  0x000000001000f7e0 in __rw::__rw_extract_bitset<19ul, char, std::char_traits<char> > (__strm=@0x1ffffffdf20, __x=@0x1ffffffe000)
>     at bitset.cc:128
> #3  0x0000000010030424 in std::operator>><char, std::char_traits<char>, 19ul> (__strm=@0x1ffffffdf20, __x=@0x1ffffffe000) at bitset:699
> #4  0x00000000100310f4 in test_error<19ul, char> (t=@0x1ffffffe390) at bitset_io.cpp:334
> #5  0x000000001004b6e4 in Test::runTest (this=0x1ffffffe390) at bitset_io.cpp:379
> #6  0x0000000010061a10 in RWQETest::go (this=0x1ffffffe390) at rwtest.cpp:857
> #7  0x000000001004b574 in main (argc=1, argv=0x1ffffffe9e8) at bitset_io.cpp:409
> ---------------- gdb64 of tests/stdlib/containers/vector_modifiers ----------------------
> Starting program: /build/scottz/ed9/tests/stdlib/containers/stdlib_rs/vector_modifiers 
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000001008b6c0 in .__cxa_get_globals_fast ()
> (gdb) where
> #0  0x000000001008b6c0 in .__cxa_get_globals_fast ()
> #1  0x000000001008b1d0 in .__cxa_end_catch ()
> #2  0x000000001000dcb0 in operator new (n=96) at mynew.h:160
> #3  0x00000000100638f4 in __rw::__rw_allocate (nbytes=96) at memory.cpp:46
> #4  0x00000000100053e0 in std::allocator<X>::allocate (this=0x1ffffffd300, __n=2) at _allocator.h:138
> #5  0x0000000010005728 in std::vector<X, std::allocator<X> >::_C_realloc (this=0x1ffffffd4a8, __n=1) at vector.cc:80
> #6  0x0000000010005950 in std::vector<X, std::allocator<X> >::reserve (this=0x1ffffffd4a8, __n=1) at vector:549
> #7  0x0000000010006a8c in std::vector<X, std::allocator<X> >::_C_insert_n (this=0x1ffffffd908, __it=@0x1ffffffd610, __n=1, __x=@0x10101df8)
>     at vector.cc:180
> #8  0x0000000010008328 in std::vector<X, std::allocator<X> >::_C_insert_1 (this=0x1ffffffd908, __it=@0x1ffffffd610, __x=@0x10101df8)
>     at vector.cc:155
> #9  0x0000000010008400 in std::vector<X, std::allocator<X> >::push_back (this=0x1ffffffd908, __x=@0x10101df8) at vector:559
> #10 0x0000000010008508 in std::vector<X, std::allocator<X> >::insert (this=0x1ffffffd908, __it=0x0, __x=@0x10101df8) at vector:577
> #11 0x000000001000eb8c in exception_loop<X*> (t=@0x1ffffffe390, line=672, fcall=0x101035a0 "vector().insert(end(), 97)", capchg=true, 
>     vec=@0x1ffffffd908, it=@0x1ffffffd920, n=-2, x=0x10101df8, first=@0x1ffffffdca0, last=@0x1ffffffdca0, n_copy=0x1ffffffd940, 
>     n_asgn=0x1ffffffd948) at vector_modifiers.cpp:144
> #12 0x0000000010015350 in test_insert<X*> (t=@0x1ffffffe390, line=672, dummy=@0x1ffffffdca0, n=-2, seq=0x10094216 "", seqlen=0, seqcap=0, off=0, 
>     ins=0x1ffffffdc98 "a", inslen=1, res=0x1009462e "a", reslen=1) at vector_modifiers.cpp:322
> #13 0x000000001001b2b0 in run_test (t=@0x1ffffffe390) at vector_modifiers.cpp:672
> #14 0x000000001001c46c in Test::runTest (this=0x1ffffffe390) at vector_modifiers.cpp:772
> #15 0x0000000010034d80 in RWQETest::go (this=0x1ffffffe390) at rwtest.cpp:857
> #16 0x0000000010014e50 in main (argc=1, argv=0x1ffffffe9e8) at vector_modifiers.cpp:785
> ---------------- gdb64 of tests/stdlib/iostream/istream_manip ----------------------
> Starting program: /build/scottz/ed9/tests/stdlib/iostream/stdlib_rs/istream_manip 
> Program received signal SIGSEGV, Segmentation fault.
> 0x000000001008a7e8 in .__cxa_get_globals_fast ()
> (gdb) where
> #0  0x000000001008a7e8 in .__cxa_get_globals_fast ()
> #1  0x000000001008a2f8 in .__cxa_end_catch ()
> #2  0x0000000010008dc4 in std::ws<char, std::char_traits<char> > (__strm=@0x1ffffffdc78) at istream:511
> #3  0x000000001000b9f4 in test_ws<char, std::char_traits<char> > (t=@0x1ffffffe390, iter=88, cbuf=0x1ffffffe030 "aaa", cbuf_size=4, 
>     state=__rw_goodbit, j=1, skipws=false, white=97 'a') at istream_manip.cpp:287
> #4  0x000000001001b688 in test_ws<char, std::char_traits<char> > (t=@0x1ffffffe390) at istream_manip.cpp:473
> #5  0x000000001001b8f0 in Test::runTest (this=0x1ffffffe390) at istream_manip.cpp:495
> #6  0x00000000100319b0 in RWQETest::go (this=0x1ffffffe390) at rwtest.cpp:857
> #7  0x000000001001a5e8 in main (argc=1, argv=0x1ffffffe9e8) at istream_manip.cpp:517

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.