Opened 7 years ago

Closed 7 years ago

#12013 closed Bugs (fixed)

F_pass and FArgs_pass tests segfault

Reported by: andrej.krutak@… Owned by: viboes
Milestone: Boost 1.61.0 Component: thread
Version: Boost 1.58.0 Severity: Problem
Keywords: Cc:

Description

Both tests override the operator new and inside it, they use std::cout.

It appears that in some cases the order of initialization (ostream vs. boost) order may be incorrect and the following exception occurs in ostream:

Program received signal SIGSEGV, Segmentation fault. 0xb7f5a296 in std::ostream::sentry::sentry (this=0xbffffca8, os=...)

at libstdc++-v3/include/bits/ostream.tcc:51

51 libstdc++-v3/include/bits/ostream.tcc: No such file or directory. (gdb) bt #0 0xb7f5a296 in std::ostream::sentry::sentry (this=0xbffffca8, os=...)

at libstdc++-v3/include/bits/ostream.tcc:51

#1 0xb7f5b3ed in std::ostream_insert<char, std::char_traits<char> > (

out=..., s=0x804ec76 "F_pass.cpp", n=10) at libstdc++-v3/include/bits/ostream_insert.h:82

#2 0xb7f5b5d7 in std::operator<< <std::char_traits<char> > (out=...,

s=<optimized out>) at libstdc++-v3/include/ostream:561

#3 0x0804afd7 in operator new(unsigned int) () #4 0xb7fd0474 in boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>() ()

from /lib/libboost_thread.so.1.58.0

#5 0xb7fc644a in _GLOBALsub_I_thread.cpp ()

from /lib/libboost_thread.so.1.58.0

#6 0xb7fd5e3e in do_global_ctors_aux () from /lib/libboost_thread.so.1.58.0 #7 0xb7fc59c4 in _init () from /lib/libboost_thread.so.1.58.0 #8 0xb7fff000 in ?? () from /lib/ld-linux.so.2

After commenting out the std::cout line, both tests pass.

Change History (4)

comment:1 by anonymous, 7 years ago

Fixed backtrace:

Program received signal SIGSEGV, Segmentation fault.
0xb7f5a296 in std::ostream::sentry::sentry (this=0xbffffca8, __os=...)
    at libstdc++-v3/include/bits/ostream.tcc:51
51      libstdc++-v3/include/bits/ostream.tcc: No such file or directory.
(gdb) bt
#0  0xb7f5a296 in std::ostream::sentry::sentry (this=0xbffffca8, __os=...)
    at libstdc++-v3/include/bits/ostream.tcc:51
#1  0xb7f5b3ed in std::__ostream_insert<char, std::char_traits<char> > (
    __out=..., __s=0x804ec76 "F_pass.cpp", __n=10)
    at libstdc++-v3/include/bits/ostream_insert.h:82
#2  0xb7f5b5d7 in std::operator<< <std::char_traits<char> > (__out=..., 
    __s=<optimized out>)
    at libstdc++-v3/include/ostream:561
#3  0x0804afd7 in operator new(unsigned int) ()
#4  0xb7fd0474 in boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>() ()
   from /lib/libboost_thread.so.1.58.0
#5  0xb7fc644a in _GLOBAL__sub_I_thread.cpp ()
   from /lib/libboost_thread.so.1.58.0
#6  0xb7fd5e3e in __do_global_ctors_aux () from /lib/libboost_thread.so.1.58.0
#7  0xb7fc59c4 in _init () from /lib/libboost_thread.so.1.58.0
#8  0xb7fff000 in ?? () from /lib/ld-linux.so.2

comment:2 by viboes, 7 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

Thanks for the report. Fortunately this is only a test issue.

comment:3 by viboes, 7 years ago

Milestone: To Be DeterminedBoost 1.61.0
Note: See TracTickets for help on using tickets.