diff options
Diffstat (limited to 'runtime/src/pe_loader.cpp')
| -rw-r--r-- | runtime/src/pe_loader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/src/pe_loader.cpp b/runtime/src/pe_loader.cpp index ecf44a221..45f3fc671 100644 --- a/runtime/src/pe_loader.cpp +++ b/runtime/src/pe_loader.cpp | |||
| @@ -835,7 +835,7 @@ constexpr size_t kMaxEndedThreads = 1024; | |||
| 835 | // load(): every other running thread gets its own copy of m's template. Not fatal where it cannot be done. | 835 | // load(): every other running thread gets its own copy of m's template. Not fatal where it cannot be done. |
| 836 | void install_on_existing_threads(Module& m) { | 836 | void install_on_existing_threads(Module& m) { |
| 837 | const uint64_t total = static_cast<uint64_t>(m.tls_raw_size) + m.tls_zero_fill; | 837 | const uint64_t total = static_cast<uint64_t>(m.tls_raw_size) + m.tls_zero_fill; |
| 838 | if (!total || m.tls_index >= kMaxModuleTlsSlots || m.tls_slot >= kMaxMappedTlsModules) return; | 838 | if (!total || m.tls_index >= kMaxModuleTlsSlots || m.tls_slot >= kTlsSlotCount) return; |
| 839 | // Stays ahead of the TLS lock: the first call resolves the function with GetModuleHandle and GetProcAddress, which | 839 | // Stays ahead of the TLS lock: the first call resolves the function with GetModuleHandle and GetProcAddress, which |
| 840 | // take the Windows loader lock, and a thread inside its attach event holds that lock while it waits for ours. | 840 | // take the Windows loader lock, and a thread inside its attach event holds that lock while it waits for ours. |
| 841 | if (!query_thread_fn()) return; | 841 | if (!query_thread_fn()) return; |