Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7666: Boost Thread SIGSEGV on join() when -D_GLIBCXX_DEBUG is used
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-18 12:21:34
#7666: Boost Thread SIGSEGV on join() when -D_GLIBCXX_DEBUG is used
-------------------------------------+-------------------------------------
Reporter: Antonio Di Monaco | Owner: viboes
<tony@â¦> | Status: assigned
Type: Bugs | Component: thread
Milestone: Boost 1.55.0 | Severity: Problem
Version: Boost 1.52.0 | Keywords: thread SIGSEGV C++11
Resolution: | -D_GLIBCXX_DEBUG
-------------------------------------+-------------------------------------
Comment (by Antonio Di Monaco <tony@â¦>):
Ok. Seems that the access to 0x0 is just when " i-> " is performed.
{{{
Breakpoint 1, 0x0040188c in
boost::detail::thread_data_base::~thread_data_base()
()
(gdb) s
Single stepping until exit from function
_ZN5boost6detail16thread_data_baseD2Ev,
which has no line number information.
boost::detail::thread_data_base::~thread_data_base (
this=0x6ced3354 <libgcc_s_sjlj-1!_Unwind_SjLj_Register+116>,
__in_chrg=<optimized out>) at libs\thread\src\win32\thread.cpp:40
40 thread_data_base::~thread_data_base()
(gdb)
Breakpoint 1, boost::detail::thread_data_base::~thread_data_base (
this=0x243330, __in_chrg=<optimized out>)
at libs\thread\src\win32\thread.cpp:40
40 thread_data_base::~thread_data_base()
(gdb)
42 for (notify_list_t::iterator i = notify.begin(), e =
notify.end(
);
(gdb)
std::vector<std::pair<boost::condition_variable*, boost::mutex*>,
std::allocator
<std::pair<boost::condition_variable*, boost::mutex*> > >::begin (
this=0x24335c)
at
c:/x32-481-win32-sjlj-r2/lib/gcc/i686-w64-mingw32/4.8.1/include/c++/bits/
stl_vector.h:539
539 { return iterator(this->_M_impl._M_start); }
(gdb) p _M_impl
$3 = {<std::allocator<std::pair<boost::condition_variable*, boost::mutex*>
>> =
{<__gnu_cxx::new_allocator<std::pair<boost::condition_variable*,
boost::mutex*>
>> = {<No data fields>}, <No data fields>}, _M_start = 0x0,
_M_finish = 0x1, _M_end_of_storage = 0x0}
(gdb) s
__gnu_cxx::__normal_iterator<std::pair<boost::condition_variable*,
boost::mutex*
>*, std::vector<std::pair<boost::condition_variable*, boost::mutex*>,
std::alloc
ator<std::pair<boost::condition_variable*, boost::mutex*> > >
>::__normal_iterat
or (this=0x22fbec, __i=@0x24335c: 0x0)
at
c:/x32-481-win32-sjlj-r2/lib/gcc/i686-w64-mingw32/4.8.1/include/c++/bits/
stl_iterator.h:726
726 __normal_iterator(const _Iterator& __i) : _M_current(__i) {
}
(gdb)
std::vector<std::pair<boost::condition_variable*, boost::mutex*>,
std::allocator
<std::pair<boost::condition_variable*, boost::mutex*> > >::end (
this=0x24335c)
at
c:/x32-481-win32-sjlj-r2/lib/gcc/i686-w64-mingw32/4.8.1/include/c++/bits/
stl_vector.h:557
557 { return iterator(this->_M_impl._M_finish); }
(gdb)
__gnu_cxx::__normal_iterator<std::pair<boost::condition_variable*,
boost::mutex*
>*, std::vector<std::pair<boost::condition_variable*, boost::mutex*>,
std::alloc
ator<std::pair<boost::condition_variable*, boost::mutex*> > >
>::__normal_iterat
or (this=0x22fbec, __i=@0x243360: 0x1)
at
c:/x32-481-win32-sjlj-r2/lib/gcc/i686-w64-mingw32/4.8.1/include/c++/bits/
stl_iterator.h:726
726 __normal_iterator(const _Iterator& __i) : _M_current(__i) {
}
(gdb)
__gnu_cxx::operator!=<std::pair<boost::condition_variable*,
boost::mutex*>*, std
::vector<std::pair<boost::condition_variable*, boost::mutex*>,
std::allocator<st
d::pair<boost::condition_variable*, boost::mutex*> > > > (
__lhs=<error reading variable: Cannot access memory at address 0x0>,
__rhs=<error reading variable: Cannot access memory at address 0x1>)
at
c:/x32-481-win32-sjlj-r2/lib/gcc/i686-w64-mingw32/4.8.1/include/c++/bits/
stl_iterator.h:825
825 { return __lhs.base() != __rhs.base(); }
(gdb)
__gnu_cxx::__normal_iterator<std::pair<boost::condition_variable*,
boost::mutex*
>*, std::vector<std::pair<boost::condition_variable*, boost::mutex*>,
std::alloc
ator<std::pair<boost::condition_variable*, boost::mutex*> > > >::base (
this=0x22fc5c)
at
c:/x32-481-win32-sjlj-r2/lib/gcc/i686-w64-mingw32/4.8.1/include/c++/bits/
stl_iterator.h:791
791 { return _M_current; }
(gdb)
__gnu_cxx::__normal_iterator<std::pair<boost::condition_variable*,
boost::mutex*
>*, std::vector<std::pair<boost::condition_variable*, boost::mutex*>,
std::alloc
ator<std::pair<boost::condition_variable*, boost::mutex*> > > >::base (
this=0x22fc58)
at
c:/x32-481-win32-sjlj-r2/lib/gcc/i686-w64-mingw32/4.8.1/include/c++/bits/
stl_iterator.h:791
791 { return _M_current; }
(gdb)
boost::detail::thread_data_base::~thread_data_base (this=0x243330,
__in_chrg=<optimized out>) at libs\thread\src\win32\thread.cpp:45
45 i->second->unlock();
(gdb) s
__gnu_cxx::__normal_iterator<std::pair<boost::condition_variable*,
boost::mutex*
>*, std::vector<std::pair<boost::condition_variable*, boost::mutex*>,
std::alloc
ator<std::pair<boost::condition_variable*, boost::mutex*> > >
>::operator->
(this=0x22fc5c)
at
c:/x32-481-win32-sjlj-r2/lib/gcc/i686-w64-mingw32/4.8.1/include/c++/bits/
stl_iterator.h:743
743 { return _M_current; }
(gdb) p _M_current
$4 = (std::pair<boost::condition_variable*, boost::mutex*> *) 0x0
(gdb) s
Program received signal SIGSEGV, Segmentation fault.
0x67e81517 in boost::detail::thread_data_base::~thread_data_base (
this=0x243330, __in_chrg=<optimized out>)
at libs\thread\src\win32\thread.cpp:45
45 i->second->unlock();
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7666#comment:19> 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:14 UTC