[OT] Re: Windows DLLs and TLS
Denis Shelomovskij
verylonglogin.reg at gmail.com
Mon Oct 8 11:13:40 PDT 2012
08.10.2012 21:47, Rainer Schuetze пишет:
> Implicite TLS for dynamically loaded DLLs is
> not supported by XP or Sever 2003, so druntime contains a fix to
> simulate it. (The workaround has the drawback that the DLL cannot be
> unloaded anymore.)
>
> I'm just speculating, maybe something goes wrong with the tls_index
> variable, reading TLS variables would then access data from another DLL.
>
> Is your code doing callbacks into the host application in static
> initializers? With the XP workaround, the runtime initialization
> "impersonates" all threads that exist before loading the DLL, by
> switching the TLS-pointer array of the current thread, and that might be
> unexpected in a callback (but not doing this might produce even more
> unexpected results).
Here you are! Just want to mention that I'm currently managed to publish
my (continuation of your) TLS fix I did half a year before. It will
finally solve this XP/Sever 2003 problem. It is available here but isn't
finished now (fill be in few days):
https://github.com/denis-sh/hooking/tree/master/tlsfixer
I hope you aren't against it is based on your work?
--
Денис В. Шеломовский
Denis V. Shelomovskij
More information about the Digitalmars-d
mailing list