http://bugs.winehq.org/show_bug.cgi?id=20466
--- Comment #27 from Anastasius Focht focht@gmx.net --- Hello folks,
some addendum, I shorted the relevant disassembly snippet a bit too much in my first comment:
--- snip --- ... 004042EA A1 1048A901 MOV EAX,DWORD PTR DS:[1A94810] ; 0 -> TLS index zero 004042EF 50 PUSH EAX 004042F0 FF15 44F16701 CALL DWORD PTR DS:[<&KERNEL32.TlsGetValue>] 004042F6 85C0 TEST EAX,EAX 004042F8 75 78 JNZ SHORT biahh.00404372 ; current TLS slot data 004042FA 8B47 1C MOV EAX,DWORD PTR DS:[EDI+1C] 004042FD 8D70 04 LEA ESI,DWORD PTR DS:[EAX+4] ... <allocate some data structures off heap and initialize> ... 00404363 A1 1048A901 MOV EAX,DWORD PTR DS:[1A94810] 00404368 56 PUSH ESI ; new data 00404369 50 PUSH EAX ; TLS index zero 0040436A FF15 40F16701 CALL DWORD PTR DS:[<&KERNEL32.TlsSetValue>] 00404370 8BC6 MOV EAX,ESI ; return new data 00404372 8B4D F4 MOV ECX,DWORD PTR SS:[EBP-C] 00404375 64:890D 00000000 MOV DWORD PTR FS:[0],ECX 0040437C 59 POP ECX 0040437D 5F POP EDI 0040437E 5E POP ESI 0040437F 5B POP EBX 00404380 8BE5 MOV ESP,EBP 00404382 5D POP EBP 00404383 C3 RETN --- snip ---
ntdll/thread: initialize 'peb->TlsBitmap' with bit 0 already set ('reserved')
TlsGetValue() and TlsSetValue() should still work with index zero marked 'reserved' (no change required).
Regards