IHypergraphSparsifier is missing a public virtual destructor
picsel2 opened this issue · 0 comments
picsel2 commented
Hello!
We are writing a student project that uses the C interface and noticed that our application randomly freezes at global destruction. Throwing AddressSanitizer at the problem we got this report:
==11666==ERROR: AddressSanitizer: new-delete-type-mismatch on 0x619000006980 in thread T1:
object passed to delete has wrong type:
size of the allocated type: 1032 bytes;
size of the deallocated type: 16 bytes.
#0 0x7fa7770bc0a8 in operator delete(void*, unsigned long) (/lib64/libasan.so.8+0xbc0a8)
#1 0x7fa7769f5f71 in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::process_bypass_loop(tbb::internal::context_guard_helper<false>&, tbb::task*, long) ../../src/tbb/custom_scheduler.h:495
#2 0x7fa7769f63b1 in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all(tbb::task&, tbb::task*) ../../src/tbb/custom_scheduler.h:636
#3 0x7fa7769efbf6 in tbb::internal::arena::process(tbb::internal::generic_scheduler&) ../../src/tbb/arena.cpp:196
#4 0x7fa7769ee31f in tbb::internal::market::process(rml::job&) ../../src/tbb/market.cpp:667
#5 0x7fa7769ea26d in tbb::internal::rml::private_worker::run() ../../src/tbb/private_server.cpp:266
#6 0x7fa7769ea4c8 in tbb::internal::rml::private_worker::thread_routine(void*) ../../src/tbb/private_server.cpp:219
#7 0x7fa776a8e14c in start_thread (/lib64/libc.so.6+0x8b14c)
#8 0x7fa776b0f9ff in clone3 (/lib64/libc.so.6+0x10c9ff)
0x619000006980 is located 0 bytes inside of 1032-byte region [0x619000006980,0x619000006d88)
allocated by thread T0 here:
#0 0x7fa7770bb1a8 in operator new(unsigned long) (/lib64/libasan.so.8+0xbb1a8)
#1 0x7fa7765e0ca0 in mt_kahypar::register_HypergraphUndefinedSparsifier::{lambda(mt_kahypar::Context const&)#1}::_FUN(mt_kahypar::Context const) (/home/sebastian/.local/opt/spack/opt/spack/linux-fedora37-haswell/gcc-12.2.1/mt-kahypar-master-bzm4vfxnyju3gqam4v3dqokbksb3ufav/lib64/libmtkahyparhgp.so+0x1e0ca0)
Thread T1 created by T0 here:
#0 0x7fa77704b3e6 in __interceptor_pthread_create (/lib64/libasan.so.8+0x4b3e6)
#1 0x7fa7769ea155 in rml::internal::thread_monitor::launch(void* (*)(void*), void*, unsigned long) ../../src/tbb/../rml/server/thread_monitor.h:218
#2 0x7fa7769ea155 in tbb::internal::rml::private_worker::wake_or_launch() ../../src/tbb/private_server.cpp:297
#3 0x7fa7769ea155 in tbb::internal::rml::private_server::wake_some(int) ../../src/tbb/private_server.cpp:395
#4 0x60c000001e3f (<unknown module>)
SUMMARY: AddressSanitizer: new-delete-type-mismatch (/lib64/libasan.so.8+0xbc0a8) in operator delete(void*, unsigned long)
==11666==HINT: if you don't care about these errors you may set ASAN_OPTIONS=new_delete_type_mismatch=0
==11666==ABORTING
I think that this stems from mt_kahypar::IHypergraphSparsifier
not having a public virtual destructor.