Issue Details (XML | Word | Printable)

Key: STDCXX-851
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Unassigned
Reporter: Martin Sebor
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

[EDG eccp/Linux] SIGSEGV in std::Init::~Init()

Created: 09/Apr/08 11:03 PM   Updated: 09/Apr/08 11:06 PM
Return to search
Component/s: 27. Input/Output
Affects Version/s: 4.2.0
Fix Version/s: 4.2.2

Time Tracking:
Original Estimate: 2h
Original Estimate - 2h
Remaining Estimate: 2h
Remaining Estimate - 2h
Time Spent: Not Specified
Remaining Estimate - 2h

Environment: EDG eccp 3.9/Linux

Severity: Runtime Error


 Description  « Hide
After fixing STDCXX-849 a good number of tests compiled with EDG eccp 3.9 on Linx/x86 fail with a SIGSEGV like the one below:
$ make -r 21.string.io.stdcxx-250 && gdb -q 21.string.io.stdcxx-250
eccp -c -I/home/sebor/stdcxx/include/ansi -D_RWSTDDEBUG    -I/home/sebor/stdcxx/include -I/build/sebor/stdcxx-eccp-3.9-11s/include -I/home/sebor/stdcxx/tests/include  -A -x --template_directory=/build/sebor/stdcxx-eccp-3.9-11s/lib -g   --display_error_number --remarks --diag_suppress 193,236,340,401,261,479,487,678,679,815   /home/sebor/stdcxx/tests/regress/21.string.io.stdcxx-250.cpp
eccp 21.string.io.stdcxx-250.o -o 21.string.io.stdcxx-250 -L/build/sebor/stdcxx-eccp-3.9-11s/rwtest -lrwtest11s --template_directory=/build/sebor/stdcxx-eccp-3.9-11s/lib    -L/build/sebor/stdcxx-eccp-3.9-11s/lib  -lstd11s  -lm 
rm 21.string.io.stdcxx-250.o
Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) run
Starting program: /build/sebor/stdcxx-eccp-3.9-11s/tests/21.string.io.stdcxx-250 

Program received signal SIGSEGV, Segmentation fault.
0x08066dd7 in _ZNSo5flushEv (this=0x5ae140)
    at /home/sebor/stdcxx/include/ostream.cc:48
48                      __res = this->rdbuf ()->pubsync ();
Current language:  auto; currently c++
Missing separate debuginfos, use: debuginfo-install gcc.i386 glibc.i686
(gdb) where
#0  0x08066dd7 in _ZNSo5flushEv (this=0x5ae140)
    at /home/sebor/stdcxx/include/ostream.cc:48
#1  0x00513b51 in std::ios_base::Init::~Init () from /usr/lib/libstdc++.so.6
#2  0x005290f0 in ?? () from /usr/lib/libstdc++.so.6
#3  0x008f2907 in __cxa_finalize () from /lib/libc.so.6
#4  0x00507c54 in ?? () from /usr/lib/libstdc++.so.6
#5  0x005a9588 in ?? () from /usr/lib/libstdc++.so.6
#6  0x00000007 in ?? ()
#7  0x00000282 in ?? ()
#8  0x00507c2a in ?? () from /usr/lib/libstdc++.so.6
#9  0x005ac5d4 in ?? () from /usr/lib/libstdc++.so.6
#10 0xf7fde290 in ?? ()
#11 0xff8353b8 in ?? ()
#12 0x005831dc in ?? () from /usr/lib/libstdc++.so.6
#13 0x00000007 in ?? ()
#14 0x008c2fc0 in ?? () from /lib/ld-linux.so.2
#15 0xff835448 in ?? ()
#16 0x008b5b22 in _dl_fini () from /lib/ld-linux.so.2
Backtrace stopped: previous frame inner to this frame (corrupt stack?)


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Sebor added a comment - 09/Apr/08 11:06 PM
Another piece of info from the debugger that might be of use – looks like _C_rdbuf has an invalid value:
(gdb) p *this
$2 = {__vptr = 0x809912c, __v_St9basic_iosIcSt11char_traitsIcEE = {
    __b_St8ios_base = {__vptr = 0x8099140, _C_rdbuf = 0x6, _C_prec = 0, 
      _C_wide = 4098, _C_fmtfl = 0, _C_state = 0 '\0', _C_except = 0 '\0', 
      _C_usr = 0x0, _C_loc = {_C_body = 0x80a75a0}}, _C_fill = 0}}