--- src/tbb/governor.cpp +++ src/tbb/governor.cpp @@ -119,8 +119,11 @@ void governor::release_resources () { #endif /* TBB_USE_ASSERT */ system_topology::destroy(); - dynamic_unlink_all(); + // Release the control storage before unloading dynamically linked libraries: + // cache_aligned_deallocate may resolve to scalable_aligned_free in libtbbmalloc, + // which must still be mapped when the controls are freed. global_control_release(); + dynamic_unlink_all(); } rml::tbb_server* governor::create_rml_server ( rml::tbb_client& client ) {