[Boost-bugs] [Boost C++ Libraries] #12013: F_pass and FArgs_pass tests segfault

Subject: [Boost-bugs] [Boost C++ Libraries] #12013: F_pass and FArgs_pass tests segfault
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-02-22 12:47:53


#12013: F_pass and FArgs_pass tests segfault
------------------------------+----------------------
 Reporter: andrej.krutak@… | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.58.0 | Severity: Problem
 Keywords: |
------------------------------+----------------------
 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 _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


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

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12013>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC