The introduction of WakeupStrategy introduces/reveals a memory corruption
This bug happens in master in debugoptimized builds.
Responsible commit 37143de2.
Found using:
git bisect start master ad10eb3a00493a12045dd251fa75dc32205ae80b --
git bisect run meson test -C build-debugoptimized/ c_api_test
The bug results in this stacktrace:
#0 0x00007ffff7dead22 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff7dd4862 in abort () from /usr/lib/libc.so.6
#2 0x00007ffff7e2cd28 in __libc_message () from /usr/lib/libc.so.6
#3 0x00007ffff7e3492a in malloc_printerr () from /usr/lib/libc.so.6
#4 0x00007ffff7e35826 in unlink_chunk.constprop () from /usr/lib/libc.so.6
#5 0x00007ffff7e3607b in _int_free () from /usr/lib/libc.so.6
#6 0x00007ffff7e399e8 in free () from /usr/lib/libc.so.6
#7 0x00007ffff7ded553 in __run_exit_handlers () from /usr/lib/libc.so.6
#8 0x00007ffff7ded64e in exit () from /usr/lib/libc.so.6
#9 0x00005555555552ca in check_fun () at ../tests/c_api_test.c:25
#10 0x00007ffff7d69947 in std::function<void (void*)>::operator()(void*) const (
__args#0=<optimized out>, this=0x7fffdc0018c8) at /usr/include/c++/11.1.0/bits/std_function.h:560
#11 Fiber::run (this=0x7fffdc0018c0) at ../emper/Fiber.cpp:13
#12 0x00007ffff7d943ff in Dispatcher::dispatch (fiber=0x7fffdc0018c0, this=0x55555556b6b8)
at ../emper/Dispatcher.hpp:30
#13 WsDispatcher::dispatchLoop (this=0x55555556b6b8) at ../emper/strategies/ws/WsDispatcher.cpp:20
The stacktrace is from thread 13 and apparently it is currently exiting.
I find this behavior only in the c_api_test
.