thread crash on windows with icc in Release
Hello Boost Users, I want to start using boost. The program below crashes for me in Release only. I am running in Visual studio 9.0 with icc 11.1. I compiled boost (1.53/1.52) with:
bootstrap.bat b2 toolset=intel-11.1 ( + "-sINTEL_BASE_MSVC_TOOLSET=vc-9_0")
#include
On Mon, 06 May 2013 08:09:10 +0200, Svetlana Olonetsky
Hello Boost Users,
I want to start using boost. The program below crashes for me in Release only.
I am running in Visual studio 9.0 with icc 11.1. I compiled boost (1.53/1.52) with:
bootstrap.bat b2 toolset=intel-11.1 ( + "-sINTEL_BASE_MSVC_TOOLSET=vc-9_0")
#include
void change_count() {}
int main(int, char*[]) { boost::thread thread_1(change_count); thread_1.join(); return 0; }
Thank you very much, Svetlana
Does it crash or throws an exception? I recall, there was a bug/misconcept in some boost versions (roughly around 1.50-1.52, not in 1.53 anymore) that thread::join throws an exception if the thread is already ended. -- Slava
Does it crash or throws an exception? I recall, there was a bug/misconcept in some boost versions (roughly around 1.50-1.52, not in 1.53 anymore) that thread::join throws an exception if the thread is already ended.
I believe you're mistaken, otherwise a lot of correct code would be broken.
Stack looks in release:
boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::run_thread_exit_callbacks()
+ 0x139 bytes
boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::thread_start_function()
+ 0x833 bytes
boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::ThreadProxy() +
0x36 bytes
I tried both 1.52/1.53.
Is there some specific version that should I try ?
Thank you,
Svetlana
On Mon, May 6, 2013 at 12:21 PM, Slava
On Mon, 06 May 2013 08:09:10 +0200, Svetlana Olonetsky < svetlana.olonetsky@gmail.com> wrote:
Hello Boost Users,
I want to start using boost. The program below crashes for me in Release only.
I am running in Visual studio 9.0 with icc 11.1. I compiled boost (1.53/1.52) with:
bootstrap.bat b2 toolset=intel-11.1 ( + "-sINTEL_BASE_MSVC_TOOLSET=vc-**9_0")
#include
void change_count() {}
int main(int, char*[]) { boost::thread thread_1(change_count); thread_1.join(); return 0; }
Thank you very much, Svetlana
Does it crash or throws an exception? I recall, there was a bug/misconcept in some boost versions (roughly around 1.50-1.52, not in 1.53 anymore) that thread::join throws an exception if the thread is already ended.
-- Slava
______________________________**_________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/**mailman/listinfo.cgi/boost-**usershttp://lists.boost.org/mailman/listinfo.cgi/boost-users
On Mon, 06 May 2013 11:34:36 +0200, Svetlana Olonetsky
Stack looks in release: boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::run_thread_exit_callbacks() + 0x139 bytes boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::thread_start_function() + 0x833 bytes boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::ThreadProxy() + 0x36 bytes
I tried both 1.52/1.53. Is there some specific version that should I try ?
Thank you, Svetlana
I guess you have to analyze the issue yourself :( Try to look at disassembly, attempt to correspond it to the source line, try to realize what may be wrong with it. You should as well report the issue to Intel, maybe the compiler is optimizing the code too aggressively or there is an issue with tls implementation. Maybe try to build the boost with msvc and your test program with icc, or vice-versa to narrow down the search area. As a workaround you may try to check if the thread is joinable before calling join: if (thread_1.joinable()) thread_1.join(); Maybe it'll help, but I'd really suggest to analyze the problem anyway. There is a bug to find and fix. -- Slava
Stack looks in release: boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::run_thread_exit_callbacks() + 0x139 bytes boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::thread_start_function() + 0x833 bytes boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::ThreadProxy() + 0x36 bytes
I tried both 1.52/1.53.
Could you please recompile Boot.Thread with /GS- option and see whether it still happens?
Sorry for asking ...
I am absolutely not familiar with bjam. Can you, please, point to file that
contains flags settings for boost.thread ?
On Mon, May 6, 2013 at 2:52 PM, Igor R
Stack looks in release:
boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::run_thread_exit_callbacks()
+ 0x139 bytes
boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::thread_start_function()
+ 0x833 bytes boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::ThreadProxy() + 0x36 bytes
I tried both 1.52/1.53.
Could you please recompile Boot.Thread with /GS- option and see whether it still happens? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Stack looks in release:
boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::run_thread_exit_callbacks() + 0x139 bytes
boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::thread_start_function() + 0x833 bytes boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::ThreadProxy() + 0x36 bytes
I tried both 1.52/1.53.
Could you please recompile Boot.Thread with /GS- option and see whether it still happens?
Sorry for asking ...
I am absolutely not familiar with bjam. Can you, please, point to file that contains flags settings for boost.thread ?
Just add the following option to your bjam line: cxxflags=/GS-
I recompiled it.
(run b2 toolset=intel-11.1 "cxxflags=/GS-")
It still crashes at the same place.
On Mon, May 6, 2013 at 4:53 PM, Igor R
Stack looks in release:
boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::run_thread_exit_callbacks()
+ 0x139 bytes
boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::thread_start_function()
+ 0x833 bytes
boost::__N_32_libs_thread_src_win32_thread_cpp_f66b8662::ThreadProxy() +
0x36 bytes
I tried both 1.52/1.53.
Could you please recompile Boot.Thread with /GS- option and see whether it still happens?
Sorry for asking ...
I am absolutely not familiar with bjam. Can you, please, point to file that contains flags settings for boost.thread ?
Just add the following option to your bjam line: cxxflags=/GS- _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Igor R
-
Slava
-
Svetlana Olonetsky