4
我用多線程HTTP服務器的Boost asio example(3)寫了一個小應用程序。定期我得到一個seg錯誤,如果我按ctrl-c該應用程序。我知道我必須在某處覆蓋內存,但不知道如何調試它。 GDB中的堆棧跟蹤沒有幫助。 GCC中有一些工具可以幫助我在檢測到腐敗之前將其擊中在Dtor中? (對不起,我大多是爪哇人)Boost線程中的分段錯誤tls_destructor
謝謝。在Debian Linux上
PS使用Boost 1.38這裏是堆棧跟蹤
Program terminated with signal 11, Segmentation fault.
#0 0xb7f74389 in tls_destructor (data=0xb5200fc8) at libs/thread/src/pthread/thread.cpp:86
86 thread_info->tss_data=current_node->next;
(gdb) where
#0 0xb7f74389 in tls_destructor (data=0xb5200fc8) at libs/thread/src/pthread/thread.cpp:86
#1 0xb7f75351 in thread_proxy (param=0xb5200fc8) at libs/thread/src/pthread/thread.cpp:142
#2 0xb7c03240 in start_thread() from /lib/tls/i686/cmov/libpthread.so.0
#3 0xb7dc049e in clone() from /lib/tls/i686/cmov/libc.so.6
(gdb)
Boost線程最近修復了很多錯誤。嘗試更新的版本。 – 2010-01-04 20:28:21