1: BPS 0x7fffe8010620 constructed state=0 by fiber 0x62ac70
0: Start dispatchLoop
1: BPS 0x7fffe80105a0 constructed state=0 by fiber 0x62ac70
1: Scheduling fiber 0x7fffe8402af0
1: Scheduling fiber 0x7fffe84028e0
0: BPS 0x7ffff0010610 constructed state=0 by fiber 0x7fffe8402af0
1: fib: Calling wait for n=4
0: Scheduling fiber 0x7ffff0402af0
1: PS 0x7fffe80105a0 block() blockedContext is 0x7fffe80008c0
0: Scheduling fiber 0x7ffff04028e0
1: Saving context 0x7fffe80008c0 and switching to 0x7fffe8010960
1: Start dispatchLoop
1: BPS 0x7fffe80206b0 constructed state=0 by fiber 0x7fffe84028e0
1: Scheduling fiber 0x7fffe8402910
1: Scheduling fiber 0x7fffe8402940
1: fib: Calling wait for n=2
1: PS 0x7fffe80206b0 block() blockedContext is 0x7fffe8010960
0: fib: Calling wait for n=3
1: Saving context 0x7fffe8010960 and switching to 0x7fffe80209e0
1: Start dispatchLoop
0: PS 0x7ffff0010610 block() blockedContext is 0x7ffff00008c0
1: fib: Calling signalAndExit for n=0
0: Saving context 0x7ffff00008c0 and switching to 0x7ffff0010960
1: fib: Calling signalAndExit for n=1
0: Start dispatchLoop
1: Discarding context 0x7fffe80209e0 and switching to 0x7fffe8010960
0: fib: Calling signalAndExit for n=1
1: fib: Calling signalAndExit for n=2
0: BPS 0x7ffff00206b0 constructed state=0 by fiber 0x7ffff0402af0
0: Scheduling fiber 0x7ffff04028e0
0: Scheduling fiber 0x7ffff0402910
1: fib: Calling signalAndExit for n=1
0: fib: Calling wait for n=2
1: fib: Calling signalAndExit for n=0
0: PS 0x7ffff00206b0 block() blockedContext is 0x7ffff0010960
1: Discarding context 0x7fffe8010960 and switching to 0x7ffff0010960
0: Saving context 0x7ffff0010960 and switching to 0x7ffff00209e0
0: Start dispatchLoop
Program received signal SIGILL, Illegal instruction.
[Switching to Thread 0x7ffff6712700 (LWP 16073)]
0x00007ffff0020943 in ?? ()
(gdb) bt
#0 0x00007ffff0020943 in ?? ()
#1 0x00007ffff00209c0 in ?? ()
#2 0x0000000000000000 in ?? ()
** Core A #2 0x000000000040e20d
Number of threads: 2
[New Thread 0x7ffff6f13700 (LWP 16112)]
0: Start workerLoop
[New Thread 0x7ffff6712700 (LWP 16113)]
0: ContextManager newWorkerHook
Just alloacted alpha fiber at 0x62ac70
0: Scheduling fiber 0x62ac70
1: Start workerLoop
1: ContextManager newWorkerHook
1: Starting context 0x7fffe80008c0
1: Start dispatchLoop
1: BPS 0x7fffe8010620 constructed state=0 by fiber 0x62ac70
1: BPS 0x7fffe80105a0 constructed state=0 by fiber 0x62ac70
1: Scheduling fiber 0x7fffe8402af0
1: Scheduling fiber 0x7fffe84028e0
1: fib: Calling wait for n=4
1: PS 0x7fffe80105a0 block() blockedContext is 0x7fffe80008c0
1: Saving context 0x7fffe80008c0 and switching to 0x7fffe8010960
1: Start dispatchLoop
1: BPS 0x7fffe80206b0 constructed state=0 by fiber 0x7fffe84028e0
1: Scheduling fiber 0x7fffe8402910
1: Scheduling fiber 0x7fffe8402940
1: fib: Calling wait for n=2
1: PS 0x7fffe80206b0 block() blockedContext is 0x7fffe8010960
1: Saving context 0x7fffe8010960 and switching to 0x7fffe80209e0
1: Start dispatchLoop
1: fib: Calling signalAndExit for n=0
1: fib: Calling signalAndExit for n=1
0: Starting context 0x7ffff00008c0
1: Discarding context 0x7fffe80209e0 and switching to 0x7fffe8010960
0: Start dispatchLoop
1: fib: Calling signalAndExit for n=2
0: BPS 0x7ffff0010610 constructed state=0 by fiber 0x7fffe8402af0
0: Scheduling fiber 0x7ffff0402af0
0: Scheduling fiber 0x7ffff04028e0
1: BPS 0x7fffe80206b0 constructed state=0 by fiber 0x7ffff0402af0
0: fib: Calling wait for n=3
1: Scheduling fiber 0x7fffe84028e0
0: PS 0x7ffff0010610 block() blockedContext is 0x7ffff00008c0
0: Saving context 0x7ffff00008c0 and switching to 0x7ffff0010960
0: Start dispatchLoop
0: fib: Calling signalAndExit for n=1
0: fib: Calling signalAndExit for n=1
1: Scheduling fiber 0x7fffe8402940
0: fib: Calling signalAndExit for n=0
1: fib: Calling wait for n=2
1
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff6f13700 (LWP 16112)]
0x000000000040e20d in std::swap<std::_Any_data> (__a=..., __b=...) at /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/bits/move.h:186
186 __a = _GLIBCXX_MOVE(__b);
(gdb) bt
#0 0x000000000040e20d in std::swap<std::_Any_data> (__a=..., __b=...) at /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/bits/move.h:186
#1 0x000000000040e197 in std::function<void ()>::swap(std::function<void ()>&) (this=0x7ffff00201a0, __x=...) at /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/functional:2156
#2 0x0000000000410770 in std::function<void ()>::operator=(std::function<void ()> const&) (this=0x41abed, __x=...) at /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/functional:2071
#3 0x000000000041010c in Context::setHook(std::function<void ()>) (this=0x40abb5 <std::_Any_data::_M_access<void (*)(void*)>() const+21>, hook=...) at /home/flo/uni-repos/uni-git/runtime/Context.hpp:82
#4 0x000000000040ef92 in ContextManager::discardAndResume (this=0x62acc0, context=0x40abb5 <std::_Any_data::_M_access<void (*)(void*)>() const+21>) at /home/flo/uni-repos/uni-git/runtime/ContextManager.cpp:77
#5 0x000000000040aca0 in PrivateSemaphore::unblockAndExit (this=0x7fffe80206b0) at /home/flo/uni-repos/uni-git/runtime/PrivateSemaphore.hpp:38
#6 0x000000000040a99f in PrivateSemaphore::signalAndExit (this=0x7fffe80206b0) at /home/flo/uni-repos/uni-git/runtime/PrivateSemaphore.hpp:55
#7 0x0000000000409fd9 in fib (voidParams=0x7fffe8020678) at /home/flo/uni-repos/uni-git/runtime/Main.cpp:57
#8 0x000000000040aa52 in std::_Function_handler<void (void*), void (*)(void*)>::_M_invoke(std::_Any_data const&, void*&&) (__functor=..., __args=<unknown type in /home/flo/uni-repos/uni-git/runtime/build/Main, CU 0x0, DIE 0x6787>) at /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/functional:1871
#9 0x0000000000411cc8 in std::function<void (void*)>::operator()(void*) const (this=0x7fffe8402940, __args=0x7fffe8020678) at /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/functional:2267
#10 0x0000000000411bb9 in Fiber::run (this=0x7fffe8402940) at /home/flo/uni-repos/uni-git/runtime/Fiber.cpp:6
#11 0x000000000040c18a in Dispatcher::dispatchLoop (this=0x62aca0) at /home/flo/uni-repos/uni-git/runtime/Dispatcher.cpp:21
#12 0x000000000040c9b9 in std::_Mem_fn_base<void (Dispatcher::*)(), true>::operator()<, void>(Dispatcher*) const (this=0x7ffff00209c0, __object=0x62aca0) at /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/functional:600
#13 0x000000000040c933 in std::_Bind<std::_Mem_fn<void (Dispatcher::*)()> (Dispatcher*)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) (this=0x7ffff00209c0, __args=<unknown type in /home/flo/uni-repos/uni-git/runtime/build/Main, CU 0xc547, DIE 0x11bed>) at /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/functional:1073
#14 0x000000000040c8c6 in std::_Bind<std::_Mem_fn<void (Dispatcher::*)()> (Dispatcher*)>::operator()<, void>() (this=0x7ffff00209c0) at /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/functional:1131
#15 0x000000000040c62d in std::_Function_handler<void (), std::_Bind<std::_Mem_fn<void (Dispatcher::*)()> (Dispatcher*)> >::_M_invoke(std::_Any_data const&) (__functor=...) at /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/functional:1871
#16 0x000000000040b81e in std::function<void ()>::operator()() const (this=0x7ffff0020978) at /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/functional:2267
#17 0x00000000004103a5 in Context::kickoff () at /home/flo/uni-repos/uni-git/runtime/Context.hpp:46
#18 0x0000000000000000 in ?? ()
** Core A #3 0x00007ffff7dd1330
Number of threads: 2
[New Thread 0x7ffff6f13700 (LWP 16453)]
[New Thread 0x7ffff6712700 (LWP 16454)]
Just alloacted alpha fiber at 0x62ac70
1: Start workerLoop
0: Start workerLoop
0: Scheduling fiber 0x62ac70
0: ContextManager newWorkerHook
1: ContextManager newWorkerHook
1: Starting context 0x7fffe80008c0
0: Starting context 0x7ffff00008c0
1: Start dispatchLoop
1: BPS 0x7fffe8010620 constructed state=0 by fiber 0x62ac70
1: BPS 0x7fffe80105a0 constructed state=0 by fiber 0x62ac70
1: Scheduling fiber 0x7fffe8402af0
1: Scheduling fiber 0x7fffe84028e0
1: fib: Calling wait for n=4
1: PS 0x7fffe80105a0 block() blockedContext is 0x7fffe80008c0
1: Saving context 0x7fffe80008c0 and switching to 0x7fffe8010960
1: Start dispatchLoop
1: BPS 0x7fffe80206b0 constructed state=0 by fiber 0x7fffe84028e0
1: Scheduling fiber 0x7fffe8402910
0: Start dispatchLoop
1: Scheduling fiber 0x7fffe8402940
0: BPS 0x7ffff0010610 constructed state=0 by fiber 0x7fffe8402af0
1: fib: Calling wait for n=2
0: Scheduling fiber 0x7ffff0402af0
1: PS 0x7fffe80206b0 block() blockedContext is 0x7fffe8010960
0: Scheduling fiber 0x7ffff04028e0
1: Saving context 0x7fffe8010960 and switching to 0x7fffe80209e0
1: Start dispatchLoop
0: fib: Calling wait for n=3
1: fib: Calling signalAndExit for n=0
0: PS 0x7ffff0010610 block() blockedContext is 0x7ffff00008c0
1: fib: Calling signalAndExit for n=1
0: Saving context 0x7ffff00008c0 and switching to 0x7ffff0010960
1: Discarding context 0x7fffe80209e0 and switching to 0x7fffe8010960
0: Start dispatchLoop
1: fib: Calling signalAndExit for n=2
0: fib: Calling signalAndExit for n=1
1: BPS 0x7fffe80206b0 constructed state=0 by fiber 0x7ffff0402af0
1: Scheduling fiber 0x7fffe84028e0
1: Scheduling fiber 0x7fffe8402940
0: fib: Calling signalAndExit for n=1
1: fib: Calling wait for n=2
0: fib: Calling signalAndExit for n=0
1: PS 0x7fffe80206b0 block() blockedContext is 0x7fffe8010960
0: Discarding context 0x7ffff0010960 and switching to 0x7fffe8010960
Error in `/home/flo/uni-repos/uni-git/runtime/build/Main': free(): invalid pointer: 0x00007ffff7dd93ea
Program received signal SIGILL, Illegal instruction.
[Switching to Thread 0x7ffff6712700 (LWP 16454)]
0x00007ffff7dd1330 in vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> > () from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libstdc++.so.6
(gdb) bt
#0 0x00007ffff7dd1330 in vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> > () from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libstdc++.so.6
#1 0x000000000000003e in ?? ()
#2 0x6666663700000028 in ?? ()
#3 0x00007fffe801fd40 in ?? ()
#4 0x00007fffe801fcd0 in ?? ()
#5 0x00007fffe801fd60 in ?? ()
#6 0x0000000000001002 in ?? ()
#7 0x00007fffffffe3ce in ?? ()
#8 0x00007ffff7076ec7 in ?? () from /lib64/libc.so.6
#9 0x00007fffe801fd40 in ?? ()
#10 0x00007ffff0402b20 in ?? ()
#11 0x00007ffff7dd9bf0 in ?? () from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libstdc++.so.6
#12 0x0000000000000003 in ?? ()
#13 0x00007ffff7076ec7 in ?? () from /lib64/libc.so.6
#14 0x00007ffff6712700 in ?? ()
#15 0x01007fffe801ffe0 in ?? ()
#16 0x00007fffe801ffe0 in ?? ()
#17 0x00007fffe801fd40 in ?? ()
#18 0x00007ffff6f8bce6 in malloc_printerr (action=-160356608, str=0x1 <error: Cannot access memory at address 0x1>, ptr=<optimized out>, ar_ptr=<optimized out>) at malloc.c:5000
#19 0x00007ffff6f8c4ee in _int_free (av=0x7ffff72abc40 <main_arena>, p=<optimized out>, have_lock=0) at malloc.c:3861
#20 0x00007ffff7b20046 in __gnu_cxx::new_allocator<char>::deallocate (this=0x7fffe801fcf0, __p=<optimized out>) at /var/tmp/portage/sys-devel/gcc-5.4.0/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/ext/new_allocator.h:110
#21 std::allocator_traits<std::allocator<char> >::deallocate (__a=..., __n=<optimized out>, __p=<optimized out>) at /var/tmp/portage/sys-devel/gcc-5.4.0/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/alloc_traits.h:517
#22 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_destroy (__size=<optimized out>, this=0x7fffe801fcf0) at /var/tmp/portage/sys-devel/gcc-5.4.0/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:185
#23 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose (this=0x7fffe801fcf0) at /var/tmp/portage/sys-devel/gcc-5.4.0/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:180
#24 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string (this=0x7fffe801fcf0, __in_chrg=<optimized out>) at /var/tmp/portage/sys-devel/gcc-5.4.0/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:543
#25 std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::~basic_stringbuf (this=0x7fffe801fca8, __in_chrg=<optimized out>) at /var/tmp/portage/sys-devel/gcc-5.4.0/work/build/x86_64-pc-linux-gnu/libstdc++-v3/include/sstream:65
#27 0x00000000004101e0 in Context::saveAndStart (this=0x7fffe8010960, newContext=0x7fffe801fe58) at /home/flo/uni-repos/uni-git/runtime/Context.hpp:105
#28 0x000000000000003d in ?? ()
#29 0x000000000000003d in ?? ()
#30 0x00007ffff72ac680 in ?? () from /lib64/libc.so.6
#31 0x00007ffff7dd16a0 in vtable for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > () from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libstdc++.so.6
#32 0x0000000000000000 in ?? ()
** Core B #1
Number of threads: 2
[New Thread 0x7ffff6f13700 (LWP 23641)]
[New Thread 0x7ffff6712700 (LWP 23642)]
Just alloacted alpha fiber at 0x62cc90
0: Scheduling fiber 0x62cc90
1: Start workerLoop
0: Start workerLoop
0: ContextManager newWorkerHook
1: ContextManager newWorkerHook
1: Starting context 0x7ffff0000950
1: Start dispatchLoop
1: Executing fiber 0
1: BPS 0x7ffff0010590 constructed by fiber 0x62cc90
1: BPS 0x7ffff0010390 constructed by fiber 0x62cc90
0: Starting context 0x7fffe8000950
1: Scheduling fiber 0x7ffff0403110
0: Start dispatchLoop
1: Scheduling fiber 0x7ffff04031a0
0: Executing fiber 0
1: fib: Calling wait for n=4
0: BPS 0x7fffe8010420 constructed by fiber 0x7ffff0403110
1: PS 0x7ffff0010390 block() blockedContext is 0x7ffff0000950
0: Scheduling fiber 0x7fffe8403110
1: Saving context 0x7ffff0000950 and switching to Context 0x7ffff00109b0 [tos: 0x7ffff00209a0 bos: 0x7ffff00109b0]
0: Scheduling fiber 0x7fffe84031a0
1: Start dispatchLoop
0: fib: Calling wait for n=3
1: Executing fiber 0x62cc90
1: BPS 0x7ffff0020480 constructed by fiber 0x7ffff04031a0
0: PS 0x7fffe8010420 block() blockedContext is 0x7fffe8000950
1: Scheduling fiber 0x7ffff0403210
0: Saving context 0x7fffe8000950 and switching to Context 0x7fffe80109b0 [tos: 0x7fffe80209a0 bos: 0x7fffe80109b0]
1: Scheduling fiber 0x7ffff0403240
1: fib: Calling wait for n=2
1: PS 0x7ffff0020480 block() blockedContext is 0x7ffff00109b0
0: Start dispatchLoop
0: Executing fiber 0x7ffff0403110
0: fib: Calling signalAndExit for n=1
0: Executing fiber 0x7fffe84031a0
1: Saving context 0x7ffff00109b0 and switching to Context 0x7ffff0020a50 [tos: 0x7ffff0030a40 bos: 0x7ffff0020a50]
0: BPS 0x7fffe8020480 constructed by fiber 0x7fffe8403110
1: Start dispatchLoop
0: Scheduling fiber 0x7fffe84031a0
0: Scheduling fiber 0x7fffe8403210
0: fib: Calling wait for n=2
0: PS 0x7fffe8020480 block() blockedContext is 0x7fffe80109b0
1: Executing fiber 0x7ffff04031a0
1: fib: Calling signalAndExit for n=0
1: Executing fiber 0x7ffff0403240
1: fib: Calling signalAndExit for n=1
1: Discarding context 0x7ffff0020a50 and switching to 0x7ffff00109b0
1: fib: Calling signalAndExit for n=2
1: Executing fiber 0x7ffff0403210
1: fib: Calling signalAndExit for n=1
1: Executing fiber 0x7fffe84031a0
1: fib: Calling signalAndExit for n=0
1: Discarding context 0x7ffff00109b0 and switching to 0x7fffe80109b0
0: Saving context 0x7fffe80109b0 and switching to Context 0x7fffe8020a50 [tos: 0x7fffe8030a40 bos: 0x7fffe8020a50]
0: Start dispatchLoop
Program received signal SIGSEGV, Segmentation fault.