Can you reproduce this threading bug?

Alex sascha.orlov at gmail.com
Fri Jun 14 17:21:21 UTC 2019


On Friday, 14 June 2019 at 16:36:04 UTC, FeepingCreature wrote:
> Consider the following code:
>
> void main()
> {
>     import core.thread : Thread;
>
>     with (new Thread({ })) { isDaemon = true; start; }
> }
>
> On Linux, this builds and runs. Most of the time. Maybe 99% of 
> the time.
>
> But if you run it in a loop:
>
> while true; do ./test || break; done
>
> You may see that it segfaults after a few seconds. At least, it 
> does for me on 2.080.0, Linux 4.18.0-20 x86_64.
>
> This is obviously quite bad. Any ideas?

Can reproduce. DMD64 D Compiler v2.086.0, MacOs 10.13.6; Darwin 
Kernel Version 17.7.0; x86_64


More information about the Digitalmars-d mailing list