Re: Reload a DLL and _getptd returns zero

2013-01-16 Thread Piotr Caban
On 01/15/13 22:36, Michael Ost wrote: Do you know what the implications are of using this hack? Would it simply be that any windows code that wants to use FlsAlloc would fail to load with a wine linkage error? Yes, any code that uses the function will fail while trying to call it. Also, is thi

Re: Reload a DLL and _getptd returns zero

2013-01-15 Thread Michael Ost
On 01/15/2013 01:08 PM, Piotr Caban wrote: On 1/15/13 7:59 PM, Michael Ost wrote: On 01/15/2013 03:39 AM, Piotr Caban wrote: The crash is caused by incomplete FlsFree implementation. There's a comment in it's code that says what needs to be added: /* FIXME: add equivalent of ThreadZeroTlsCell h

Re: Reload a DLL and _getptd returns zero

2013-01-15 Thread Piotr Caban
On 1/15/13 7:59 PM, Michael Ost wrote: On 01/15/2013 03:39 AM, Piotr Caban wrote: The crash is caused by incomplete FlsFree implementation. There's a comment in it's code that says what needs to be added: /* FIXME: add equivalent of ThreadZeroTlsCell here */ Really? Are you sure that's it? Yes

Re: Reload a DLL and _getptd returns zero

2013-01-15 Thread Michael Ost
On 01/15/2013 03:39 AM, Piotr Caban wrote: On 01/15/13 00:32, Michael Ost wrote: Here's a link to a zip file that includes the prebuilt .exe and .dll windows binaries that crash in wine. Plus the code. https://dl.dropbox.com/u/97386125/msvcrt-dll-problem.zip The crash is caused by incomplete F

Re: Reload a DLL and _getptd returns zero

2013-01-15 Thread Piotr Caban
On 01/15/13 00:32, Michael Ost wrote: Here's a link to a zip file that includes the prebuilt .exe and .dll windows binaries that crash in wine. Plus the code. https://dl.dropbox.com/u/97386125/msvcrt-dll-problem.zip The crash is caused by incomplete FlsFree implementation. There's a comment in

Re: Reload a DLL and _getptd returns zero

2013-01-14 Thread Michael Ost
On 01/12/2013 05:21 PM, Dan Kegel wrote: The library in question is using static vc runtime linkage, so _getptd() is linked in That's somewhat worrisome. So you have multiple instances of the C runtime library active in the same app? Maybe you're not unloading that dll gracefully enough. Mig

Re: Reload a DLL and _getptd returns zero

2013-01-13 Thread Nikolay Sivov
On 1/14/2013 01:59, Michael Ost wrote: On 1/13/13 1:17 PM, Marcus Meissner wrote: On Fri, Jan 11, 2013 at 11:24:55AM -0800, Michael Ost wrote: 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

Re: Reload a DLL and _getptd returns zero

2013-01-13 Thread Michael Ost
On 1/13/13 1:17 PM, Marcus Meissner wrote: On Fri, Jan 11, 2013 at 11:24:55AM -0800, Michael Ost wrote: 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 wi

Re: Reload a DLL and _getptd returns zero

2013-01-13 Thread Marcus Meissner
On Fri, Jan 11, 2013 at 11:24:55AM -0800, Michael Ost wrote: > 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 th

Re: Reload a DLL and _getptd returns zero

2013-01-12 Thread André Hentschel
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 _s

Reload a DLL and _getptd returns zero

2013-01-11 Thread 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 (