08.10.2012 15:26, Jakob Ovrum пишет:
I have a bug in one of my programs that I find particularly hard to reduce.

I am writing a Windows DLL plugin for the IRC chat client HexChat (aka
XChat). Problem is, all TLS variables, regardless of type, appear to be
initialized to complete rubbish values. Reading them does not cause an
access violation or anything, but the initial values are garbage. I am
initializing the runtime using the helpers found in core.sys.windows.dll
[1].

I wrote a dummy host application in C mimicking the loading behaviour of
HexChat - the TLS variables are initialized correctly in this case, even
though the DLL file is exactly the same.

What is it that a host application can do to break the TLS of a D plugin
it loads?

[1] http://pastebin.com/rg9uUQMe


What OS do you use? This problem should be related to Windows XP/Server 2003.

Does you dummy host application in C use implicit TLS?

Do C and D DLLs attached to this post behave differently for you regarding to TLS initialisation (load and call `getTLSIndex` and `getTLSVarValue`)?

I'll try to help but I need full test suit to see where is the difference between C and D DLLs.

--
Денис В. Шеломовский
Denis V. Shelomovskij

Attachment: DLL tests.7z
Description: application/7z-compressed

Reply via email to