Commit 87948793 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Clear the 32-bit TLS for ZeroTlsCell in Wow64 mode.

parent 3469ebf9
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment