vibe-core
vibe-core copied to clipboard
segfault when sending a message to a terminated task (vibe.d #2418)
import vibe.vibe;
struct Message
{
}
void main()
{
runTask(
{
auto tid = Task.getThis().tid;
auto t1 = runTask(
{
while (true)
{
sleep(1.seconds);
send(tid, Message.init);
}
});
auto t2 = runTask(
{
sleep(5.seconds);
enforce(false, "failure");
});
while (true)
{
receive(
(Message m) { send(t2, m); }
);
}
});
runApplication();
}
This segfaults after five seconds. My debugger says that the mbox field of the Tid t2 is 0x0.
I think this is the correct place for the ticket.