Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
798 Diskussionen

Windows debug version using tbb2021.5 and VS2017 crashes right after the executable is launched

tbbuser
Anfänger
1.310Aufrufe

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

Beschriftungen (1)
0 Kudos
1 Lösung
tbbuser
Anfänger
1.215Aufrufe

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.

Lösung in ursprünglichem Beitrag anzeigen

1 Antworten
tbbuser
Anfänger
1.216Aufrufe

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.

Antworten