Creating and destructing an instance of Thread will cause a SEGV if nothing is done in between. -------------------- import std.thread; void main(char[][] argv) { scope Thread t = new Thread(); printf("never mind...\n"); } -------------------- dragon:~/tmp> dmd dtest.d dragon:~/tmp> ./dtest never mind... Segmentation fault
Created attachment 630 [details] Fix SEGV in std.thread This bug is present in the D1 Phobos library too. The fix is trivial in both cases, and attaching a patch. See also Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581700
This is now D1 only. D2 doesn't have std.thread anymore, and the problem doesn't seem to exist in core.thread. Also: There is no ICE (Internal Compiler Error) here, so I'm removing the ice-on-valid-code keyword.
It's unlikely this D1 issue will get worked on. If it applies to D2 as well and/or if anyone plans to work on it, please reopen.