Crash is seen when pthread code tries to access an offset from thread_handle
#0 0x00007f6c7459b7d8 in pthread_join () from /lib64/libpthread.so.0
#1 0x00007f6c7438c310 in boost::thread::join (this=0x4069ef0)
Here is the thread info from object (this=0x4069ef0):
$14 = (boost::detail::thread_data_base *) 0x3c2fd90
(gdb) p *$9.px
$15 = {
<boost::enable_shared_from_this<boost::detail::thread_data_base>> = {
weak_this_ = {
px = 0x3c2fd90,
pn = {
pi_ = 0x3c2ff20
}
}
},
members of boost::detail::thread_data_base:
_vptr.thread_data_base = 0x102c3f0,
self = {
px = 0x0,
pn = {
pi_ = 0x0
}
},
thread_handle = 140103459141968,
Доступ к содержимому из thread_handle, вызывающего segfault. При попытке просмотра содержимого из * thread_handle
Не удается получить доступ к памяти по адресу 0x7f6c60e9f950
Версия Boost - boost-1.41.0
Вот код, который создает поток
t1 = new boost::thread(boost::bind(&test::Th, this));
Позже во время очистки
t1->join();
вызвать сегрегацию
У нас был код, который перехватывал pthreads и освобождал стек, выделенную с помощью pthread api. Позже, когда boost получил доступ к нему, поскольку стек ушел, мы видели проблему.