[Issue 18815] thread_attachThis crash
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue May  1 23:10:46 UTC 2018
    
    
  
https://issues.dlang.org/show_bug.cgi?id=18815
--- Comment #1 from Manu <turkeyman at gmail.com> ---
I just confirmed, this is a regression from 2.78 to 2.79.
It runs when building with 2.78, newer releases segfault.
main.cpp:
---------
#include <thread>
extern "C" void rt_init();
extern "C" void dfunc();
void thread_func()
{
    dfunc();
}
void main()
{
    rt_init();
    std::thread thread(thread_func);
    thread.join();
}
test.d:
-------
import std.stdio;
extern(C) void dfunc()
{
        import core.thread;
        thread_attachThis();
        writeln("Hello\n");
}
--
    
    
More information about the Digitalmars-d-bugs
mailing list