When using clang++ (version 3.1 under cygwin/Windows) and SystemC 2.3, I get a coredump when killing a dynamically spawned process. The message is:
terminate called after throwing an instance of 'sc_core::sc_unwind_exception'
what(): KILL
Aborted (core dumped)
Using gcc/g++ works correctly. Any idea what is causing this? Attached a simple example to reproduce the coredump.
SC_MODULE(x) { void f1() { sc_process_handle h2 = sc_spawn(sc_bind(&x::f2, this) ); wait(5, SC_MS); if (h2.valid()) h2.kill(); } void f2() { cout << "@" << sc_time_stamp() << ": A" << endl; wait(10, SC_MS); cout << "@" << sc_time_stamp() << ": B" << endl; } SC_CTOR(x) { sc_process_handle h1 = sc_spawn(sc_bind(&x::f1, this) ); }; }; int sc_main(int, char*[]) { x mod_x("x"); sc_start(); return 0; }