From: Viatcheslav.Sysoltsev@h-d-gmbh.de Date: Thu, 17 Feb 2011 09:42:53 +0100 Subject: Re: [Boost-users] [Thread] Interrupting a thread causes a segmentation fault
I believe the test programm is all right, it works well with boost 1.36 and 1.45 on linux with gcc 4.3.2 with both dynamic and static boost linkage. Check out the stack trace at the moment of failure, it shall give good insight into kind of problem.
-- Slava
I ran the debugger and took a look at the output at the point of the fault. Unfortunately, I didn't find it particularly enlightening, although it seems clear that the fault is occurring when the thread_interrupted exception is thrown by the Boost Thread library.
In case it might be useful, I've included the information from the debugger below, as well as an excerpt from thread.cpp containing the function in which the fault occurs (to save anyone reading this the time of going to check the source).
Any suggestions as to what might be the problem here would be appreciated; I also should note that I'm using Windows XP, so it may be an issue with the Windows API since the program apparently runs fine on Linux.
Thanks,
William
CALL STACK
=============================================================================
#0 00000000 0x00406410 in __cxa_throw() (??:??)
#1 00403070 boost::this_thread::interruption_point() (libs\thread\src\win32\thread.cpp:495)
#2 00401359 testingThread() (C:\Documents and Settings\WFrane\My Documents\C++ code\boost thread interrupt test\boost_thread_interrupt_test\main.cpp:12)
#3 00422666 boost::detail::thread_data