https://bugs.winehq.org/show_bug.cgi?id=40583
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
--- Comment #1 from Dmitry Timoshkov dmitry@baikal.ru --- There are several problems with that code.
First it highly depends on the OS and compiler (and is i386 specific). According to my tests NtCurrentTeb()->ThreadLocalStoragePointer may be not initialized, or initialized differently depending on whether PE image provides TLS or not. Currently Wine doesn't initialize TEB TLS pointer at all if there is no TLS in the loaded PE modules. Next, the code uses pretty convoluted way of accessing teb->ThreadLocalStoragePointer of the target thread that currently doesn't work under Wine, basically GetThreadSelectorEntry(context.SegFs) fails leading to a crash.