- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using Windows debug version of my executable using tbb 2021.5 and VS2017 compiler, crashes right after the executable is launched. The optimized version of the executable does not crash.
I have used tbb::enumerable_thread_specific feature in my code. Looks like there is some memory corruption when it is trying to initialize this variable.
I have a capture of the stack trace in windbg.
Could you please let me know what could be going wrong here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I figured out the problem.
My CMakeLists.txt for tbb (configuration file ) was missing the following lines which disables the inter procedural optimization of the tbb code.
if (CMAKE_BUILD_TYPE)
string(TOLOWER ${CMAKE_BUILD_TYPE} _tbb_build_type)
if (_tbb_build_type STREQUAL "debug")
set(TBB_ENABLE_IPO OFF)
endif()
unset(_tbb_build_type)
endif()
The debug build no longer crashes.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I figured out the problem.
My CMakeLists.txt for tbb (configuration file ) was missing the following lines which disables the inter procedural optimization of the tbb code.
if (CMAKE_BUILD_TYPE)
string(TOLOWER ${CMAKE_BUILD_TYPE} _tbb_build_type)
if (_tbb_build_type STREQUAL "debug")
set(TBB_ENABLE_IPO OFF)
endif()
unset(_tbb_build_type)
endif()
The debug build no longer crashes.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page