[dmd-beta] dmd 1.070 and 2.055 beta

Rainer Schuetze r.sagitario at gmx.de
Mon Sep 5 14:53:48 PDT 2011


On 05.09.2011 21:35, Sönke Ludwig wrote:
> Am 05.09.2011 19:54, schrieb Rainer Schuetze:
>>
>> What OS are you running on?
>>
>> Your code works for me (XP SP3). Also Visual D works fine AFAICT (its 
>> a plugin DLL to VS).
>>
> Windows 7 x64 SP1... But it is more complicated than it seemed.
>
> I had another file linked to the DLL that I thought had not effect. 
> But actually it used a function from another DLL* that was linked in 
> statically via passing a .lib file to the command line (along with the 
> source files). The error does not occur if compiling and linking is 
> done by separate invocations of dmd. Also commenting out all the lines 
> that use a function from the external DLL fixes the problem.
>
> (* that DLL is LLVM 2.9, so no D code inside)
>
>

There might be issues if you are calling another DLL from inside the 
(non-shared) static constructors and that DLL also uses TLS. In 
DllMain(DLL_PROCESS_ATTACH), each existing thread is initialized by just 
swapping the TLS data of the DLL and then running the module 
initialization. So if another DLL is called, it will only see the TLS of 
the thread that called DllMain.

I don't think anything in this code has changes recently. Is this a 
regression from the last dmd version?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-beta/attachments/20110905/d3eedd64/attachment.html>


More information about the dmd-beta mailing list