Reload a DLL and _getptd returns zero

André Hentschel nerv at dawncrow.de
Sat Jan 12 06:34:40 CST 2013


Am 11.01.2013 20:24, schrieb Michael Ost:
> Hi list,
> 
> Does anyone know why _getptd() calls would return zero on a DLL that has been reloaded? Does something happen to the TLS used by _getptd?
> 
> At Muse Research we have been struggling with a deep bug for years where there is a crash _sometimes_ if you load a DLL a second time.
> 
> Finally (with a big tip of the hat to Julien Pommier at PianoTeq!) we have a test case that demonstrates a (if not _the_) crash.
> 
> The sequence is:
> 1. [main] start a thread
> 2. [main] load a library
> 3. [thread] call std::cout<< from the library
> 4. [main] free the library
> 5. [main] reload the library
> 6. [thread] call std::cout<< from the library
> -> crash!

Hi Michael,
developers are sometimes quite lazy, provide some testcode (maybe shipping with an executable) and you have better chances, maybe file a bug, not sure.


-- 

Best Regards, André Hentschel



More information about the wine-devel mailing list