When I build my program in release mode it works fine.
The stack trace leading up to the failure is as follows:
...and eventually leads back to __do_global_ctors_aux() in one of my modules.
If I'm reading this correctly, one of my static constructors is creating a concurrent_hash_map. That causes tbb::internal::initialize_cache_aligned_allocator() to try to load a shared library, which fails. dlopen() tries to report the error but that requires a call to the tbb debug memory allocator which has not yet been set up, leading to the assertion.
That sound right?
What I'm trying to figure out is what shared library tbb::internal::initialize_cache_aligned_allocator() is failing to load. When I use 'ldd' on my program all of the shared objects resolve correctly, so it must be something which is hard-coded into tbb itself.
Note that in the listings above copies of the necessary intel libraries are kept in /localBuild/lib and the application's LD_LIBRARY_PATH is set to look for them there.