Opened 9 years ago
Closed 9 years ago
#8788 closed Bugs (duplicate)
SIGSEGV on thread::join
Reported by: | anonymous | Owned by: | Anthony Williams |
---|---|---|---|
Milestone: | To Be Determined | Component: | thread |
Version: | Boost 1.53.0 | Severity: | Problem |
Keywords: | SIGSEGV, thread | Cc: |
Description
Fedora 19, x86_64.
The following program:
#include <boost/thread/thread.hpp> void myFunc() { } int main(int, char **) { boost::thread p(myFunc); p.join(); }
When compiled with:
g++ -o bthread bthread.cxx -lboost_thread -D_GLIBCXX_DEBUG
Results in the following segfault (with -ggdb added):
boost::detail::thread_data_base::~thread_data_base (this=0x6100d0, __in_chrg=<optimized out>) at libs/thread/src/pthread/thread.cpp:42 42 i->second->unlock(); (gdb) bt full #0 boost::detail::thread_data_base::~thread_data_base (this=0x6100d0, __in_chrg=<optimized out>) at libs/thread/src/pthread/thread.cpp:42 i = <error reading variable i (Cannot access memory at address 0x1)> e = <error reading variable e (Cannot access memory at address 0x0)> #1 0x00000000004095bb in boost::detail::thread_data<void (*)()>::~thread_data (this=0x6100d0, __in_chrg=<optimized out>) at /usr/include/boost/thread/detail/thread.hpp:91 No locals. #2 0x00000000004095ea in boost::detail::thread_data<void (*)()>::~thread_data (this=0x6100d0, __in_chrg=<optimized out>) at /usr/include/boost/thread/detail/thread.hpp:91 No locals. #3 0x0000000000409622 in boost::checked_delete<boost::detail::thread_data<void (*)()> > (x=0x6100d0) at /usr/include/boost/checked_delete.hpp:34 No locals. #4 0x0000000000409912 in boost::detail::sp_counted_impl_p<boost::detail::thread_data<void (*)()> >::dispose (this=0x6102f0) at /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:78 No locals. #5 0x00000000004052ce in boost::detail::sp_counted_base::release (this=0x6102f0) at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:146 No locals. #6 0x000000360500c93d in ~shared_count (this=0x7fffffffe0e8, __in_chrg=<optimized out>) at boost/smart_ptr/detail/shared_count.hpp:371 No locals. #7 ~shared_ptr (this=0x7fffffffe0e0, __in_chrg=<optimized out>) at boost/smart_ptr/shared_ptr.hpp:328 No locals. #8 boost::thread::join_noexcept (this=0x7fffffffe1c0) at libs/thread/src/pthread/thread.cpp:340 local_thread_info = {px = 0x6100d0, pn = {pi_ = 0x6102f0}} ---Type <return> to continue, or q <return> to quit--- #9 0x0000000000405bf5 in boost::thread::join (this=0x7fffffffe1c0) at /usr/include/boost/thread/detail/thread.hpp:751 No locals. #10 0x00000000004045eb in main () at bthread.cxx:11 p = {thread_info = {px = 0x0, pn = {pi_ = 0x0}}}
See also ticket #7666.
Note:
See TracTickets
for help on using tickets.
Duplicate of #7666.