[Boost-bugs] [Boost C++ Libraries] #8508: Created thread segfaults when memory is scarce

Subject: [Boost-bugs] [Boost C++ Libraries] #8508: Created thread segfaults when memory is scarce
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-27 08:58:50


#8508: Created thread segfaults when memory is scarce
------------------------------+---------------------------------------------
 Reporter: anonymous | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.53.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 The following code will segfault in the created thread if memory is
 scarce:

 {{{
 #include <boost/thread/thread.hpp>

 void thread_main()
 {
 }

 int main(void)
 {
         boost::thread t(thread_main);
         t.join();
 }
 }}}

 This was run in GDB with ulimit -v 150000 applied beforehand. You'll have
 to experiment with the exact value.

 GDB output:
 {{{
 [Thread debugging using libthread_db enabled]
 Using host libthread_db library "/usr/lib/libthread_db.so.1".
 [New Thread 0x7ffff69d5700 (LWP 2913)]

 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 0x7ffff69d5700 (LWP 2913)]
 0x00007ffff7bd593e in boost::detail::get_once_per_thread_epoch() () from
 /usr/lib/libboost_thread.so.1.53.0
 }}}

 Backtrace:
 {{{
 #0 0x00007ffff7bd593e in boost::detail::get_once_per_thread_epoch() ()
 from /usr/lib/libboost_thread.so.1.53.0
 #1 0x00007ffff7bcf3b2 in ?? () from /usr/lib/libboost_thread.so.1.53.0
 #2 0x00007ffff7bcf689 in
 boost::detail::set_current_thread_data(boost::detail::thread_data_base*)
 ()
    from /usr/lib/libboost_thread.so.1.53.0
 #3 0x00007ffff7bcf9ff in ?? () from /usr/lib/libboost_thread.so.1.53.0
 #4 0x00007ffff6be5dd2 in start_thread () from /usr/lib/libpthread.so.0
 #5 0x00007ffff6edfced in clone () from /usr/lib/libc.so.6
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8508>
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:12 UTC