[Issue 21686] New: segfault if daemon thread is killed, interrupts syscall and throws exception
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Mar 7 15:43:02 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21686
Issue ID: 21686
Summary: segfault if daemon thread is killed, interrupts
syscall and throws exception
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: tobias at pankrath.net
---
import core.thread;
import core.sys.linux.time : nanosleep, timespec, time_t;
void main()
{
auto t = new Thread(&worker);
t.isDaemon = true;
t.start();
Thread.sleep(1.seconds);
}
void worker()
{
timespec s = timespec(time_t(10), 0);
if (nanosleep(&s, null) != 0)
throw new Exception("");
}
---
This segfaults for me with bt:
(gdb) bt
#0 0x000055f31a7b047e in
gc.impl.conservative.gc.SmallObjectPool.allocPage(ubyte) ()
#1 0x0000000000000000 in ?? ()
--
More information about the Digitalmars-d-bugs
mailing list