Subject: [Boost-bugs] [Boost C++ Libraries] #7666: Boost Thread SIGSEGV
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-11-08 22:39:56
#7666: Boost Thread SIGSEGV
-------------------------------------------------+--------------------------
Reporter: Antonio Di Monaco <tony@â¦> | Owner: anthonyw
Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.52.0 | Severity: Problem
Keywords: thread SIGSEGV C++11 |
-------------------------------------------------+--------------------------
I'd like to report a SIGSEGV using MinGW GCC 4.7.2 and Boost 1.52.0.
Boost 1.51 is working fine.
I've compiled Boost libraries using "-std=c++11 -std=gnu++11" flags.
If I compile this code:
{{{
#include <boost/thread/thread.hpp>
void myFunc()
{
boost::this_thread::sleep(boost::posix_time::seconds(5));
}
int main(int, char **)
{
boost::thread p(myFunc);
p.join();
return 0;
}
}}}
with the following flags:
{{{
-DBOOST_ALL_DYN_LINK -DBOOST_ASIO_DISABLE_BUFFER_DEBUGGING
-DBOOST_CHRONO_VERSION=2 -DBOOST_FILESYSTEM_NO_DEPRECATED
-DBOOST_FILESYSTEM_VERSION=3
-DBOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V3_0_0
-DBOOST_THREAD_VERSION=3 -DSIMULATOR -DUNICODE -D_UNICODE
-D_WIN32_WINNT=0x0500 -std=c++11 -std=gnu++11 -mno-ms-bitfields -Wall
-Wextra -Wuninitialized -Wold-style-cast -Woverloaded-virtual -Wnoexcept
-Wnon-virtual-dtor -Winit-self -Wmissing-include-dirs -Wunused-parameter
-pedantic -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -g -O0 -fno-inline
-gdwarf-2 -g3 -fstack-protector-all
}}}
and I link it with the following options:
{{{
-lssp C:\MinGW\lib\libboost_system-mt-d.dll C:\MinGW\lib\libboost_thread-
mt-d.dll C:\MinGW\lib\libboost_chrono-mt-d.dll -lkernel32 -luser32 -lgdi32
-lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
}}}
at run the thread is launched, and after 5 seconds I get a SIGSEGV, with
the following GDB backtrace:
{{{
(gdb) r
Starting program: C:\Users\Tony\Documents\sitradesdk\output\atomictest.exe
[New Thread 1224.0xcb0]
[New Thread 1224.0xf10]
Program received signal SIGSEGV, Segmentation fault.
0x70a012cf in boost::detail::thread_data_base::~thread_data_base (
this=0x8750d0, __in_chrg=<optimized out>)
at libs\thread\src\win32\thread.cpp:43
43 i->second->unlock();
(gdb) bt
#0 0x70a012cf in boost::detail::thread_data_base::~thread_data_base (
this=0x8750d0, __in_chrg=<optimized out>)
at libs\thread\src\win32\thread.cpp:43
#1 0x00405d9c in _fu832____stack_chk_guard ()
at C:/MinGW/include/boost/thread/detail/thread.hpp:52
#2 0x70a0730a in
boost::detail::heap_delete<boost::detail::thread_data_base>
(data=0x8750d0) at ./boost/thread/win32/thread_heap_alloc.hpp:416
#3 0x70a08069 in boost::detail::intrusive_ptr_release (p=0x8750d0)
at ./boost/thread/win32/thread_data.hpp:121
#4 0x70a0422b in
boost::intrusive_ptr<boost::detail::thread_data_base>::~intrus
ive_ptr (this=0x28fe58, __in_chrg=<optimized out>)
at ./boost/smart_ptr/intrusive_ptr.hpp:96
#5 0x70a01cc0 in boost::thread::join (this=0x28fef8)
at libs\thread\src\win32\thread.cpp:331
#6 0x004015c1 in _fu12____stack_chk_guard ()
at C:\Users\Tony\Documents\sitradesdk\test\utils\atomic.cpp:82
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7666> 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:11 UTC