ntdll: Clear the 32-bit TLS for ZeroTlsCell in Wow64 mode.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3469ebf90e
commit
8794879335
|
@ -3017,6 +3017,11 @@ NTSTATUS virtual_clear_tls_index( ULONG index )
|
|||
LIST_FOR_EACH_ENTRY( thread_data, &teb_list, struct ntdll_thread_data, entry )
|
||||
{
|
||||
TEB *teb = CONTAINING_RECORD( thread_data, TEB, GdiTebBatch );
|
||||
#ifdef _WIN64
|
||||
WOW_TEB *wow_teb = get_wow_teb( teb );
|
||||
if (wow_teb) wow_teb->TlsSlots[index] = 0;
|
||||
else
|
||||
#endif
|
||||
teb->TlsSlots[index] = 0;
|
||||
}
|
||||
server_leave_uninterrupted_section( &virtual_mutex, &sigset );
|
||||
|
@ -3030,6 +3035,15 @@ NTSTATUS virtual_clear_tls_index( ULONG index )
|
|||
LIST_FOR_EACH_ENTRY( thread_data, &teb_list, struct ntdll_thread_data, entry )
|
||||
{
|
||||
TEB *teb = CONTAINING_RECORD( thread_data, TEB, GdiTebBatch );
|
||||
#ifdef _WIN64
|
||||
WOW_TEB *wow_teb = get_wow_teb( teb );
|
||||
if (wow_teb)
|
||||
{
|
||||
if (wow_teb->TlsExpansionSlots)
|
||||
((ULONG *)ULongToPtr( wow_teb->TlsExpansionSlots ))[index] = 0;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (teb->TlsExpansionSlots) teb->TlsExpansionSlots[index] = 0;
|
||||
}
|
||||
server_leave_uninterrupted_section( &virtual_mutex, &sigset );
|
||||
|
|
Loading…
Reference in New Issue