[D-runtime] DLL initialization in Druntime

Rainer Schuetze r.sagitario at gmx.de
Sun Jan 16 13:29:54 PST 2011


Walter Bright wrote:
> 
> 
> Rainer Schuetze wrote:
>> Walter Bright wrote:
>>>> BTW: there is a regression in 2.051 regarding DLLs in a multi-threading
>>>> environment: http://d.puremagic.com/issues/show_bug.cgi?id=5382
>>>
>>> This is a mystery, as there is no such variable in src/core/dll_helper.d
>>>
>>
>> Maybe the diff shows the wrong direction patched <-> original.
>> Using _moduleinfo_tlsdtors_i from object_.d no longer works, so the 
>> patch adds tlsCtorRun.
>>
> 
> If you're using multithreaded dlls in Windows, have you not seen the 
> failed initialization issues? As I posted before, it's hard to see how 
> it ever could have worked.

I'm not using the gc-proxy, so I have not hit the problem. My DLL works 
"stand-alone", i.e. it uses the standard GC without sharing between 
DLLs. It loads into a C++/C# environment using COM interfaces (but uses 
http://d.puremagic.com/issues/show_bug.cgi?id=4092 ).

The phobos.dll stuff also just uses the standard GC, exporting the 
symbols to other DLLs to link against. It has been proof of feasibility, 
but I'm not really using it.



More information about the D-runtime mailing list