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 this what the VC runtimes that are statically compiled into a windows DLL do if FlsAlloc is unavailable? For backwards compatibility, I presume...?
I guess it's for backwards compatibility.
Is the "hacky implementation" the line:
"if (NtCurrentTeb()->FlsSlots) NtCurrentTeb()->FlsSlots[index] = 0;"
It only clears the data in thread that calls FlsFree. It needs to be cleared in every thread that was using it.
that I see in FlsFree? Because, if so, that doesn't fix the crash. If not, I'd be interested in seeing your hack because we might just use it.
It was written just to check if it helps. It's not usable for anyone.