Files
reactos/modules
Shane Fournier 23043ce0b8 [NTDLL:LDR] Add Implicit Thread Local Storage Support (#7594)
Before Windows Vista, TLS directories were ignored by Ldr* in any module loaded after process creation, which meant that the TLS index in any delay-loaded module remained 0. This means that when running an application targeting Vista and above and its delay-load modules have TLS directories, the following events can happen:

    One or more delay-load modules claim ThreadLocalStoragePointer idx 0, resulting in data corruption and possible buffer overflows as data intended for one of the immediate-load modules is overwritten.

    None of the immediate-load modules has a TLS directory, so ThreadLocalStoragePointer is not initialized. This means that the program crashes when one of the delay-load modules attempts to access its TLS data.

Adding implicit TLS support improves support for NT 6.x/10 user-mode applications, including all contemporary major web browsers.

JIRA issue: CORE-19413

---------

Co-authored-by: Justin Miller <justin.miller@reactos.org>
2026-03-31 11:21:57 +00:00
..