gecko-dev/mozglue/misc
Toshihito Kikuchi 3694eeda43 Bug 1592486 - Store ModuleLoadFrame::sTopFrame as a global variable if TLS is not ready. r=aklotz
We had a thread-local varialbe `ModuleLoadFrame::sTopFrame` to track the topmost
stack frame of `LdrLoadDll`.  However, our hook function `patched_LdrLoadDll` can
be called even before TLS is initialized.  In such a case, accessing `sTopFrame`
causes AV.

This patch introduces `SafeThreadLocal` to safely access a thread-local varialbe.
If TLS is not initialized, it falls back to a global variable because in that
early stage there is only a single thread running.

Differential Revision: https://phabricator.services.mozilla.com/D55870

--HG--
extra : moz-landing-system : lando
2020-02-07 18:08:11 +00:00
..
decimal
interceptor Bug 1608645 - Ensure FindExportAddressTableEntry can handle a modified Export Table. r=aklotz 2020-01-21 00:44:28 +00:00
AutoProfilerLabel.cpp
AutoProfilerLabel.h
ConditionVariable_posix.cpp
ConditionVariable_windows.cpp
Debug.h
DynamicallyLinkedFunctionPtr.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
ImportDir.h Bug 1587539 - Skip bounds check when getting IAT if Import Directory is tampered. r=aklotz 2019-11-06 21:54:55 +00:00
moz.build Bug 1598196 - Support disabling the linker on Android in the code. r=froydnj 2019-11-21 14:57:24 +00:00
Mutex_posix.cpp
Mutex_windows.cpp
MutexPlatformData_posix.h
MutexPlatformData_windows.h
NativeNt.h Bug 1592486 - Store ModuleLoadFrame::sTopFrame as a global variable if TLS is not ready. r=aklotz 2020-02-07 18:08:11 +00:00
nsWindowsDllInterceptor.h Bug 1598119 - Disable Control Flow Guard for WindowsDllInterceptor returns r=handyman 2020-01-21 18:50:22 +00:00
PlatformConditionVariable.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
PlatformMutex.h Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj 2020-01-20 16:19:48 +00:00
Printf.cpp Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj 2019-12-20 07:16:43 +00:00
Printf.h
StackWalk_windows.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-10-06 18:29:55 +00:00
StackWalk.cpp Bug 1598196 - Support disabling the linker on Android in the code. r=froydnj 2019-11-21 14:57:24 +00:00
StackWalk.h
TimeStamp_darwin.cpp Bug 1577236 - clang-10: Fix -Wimplicit-int-float-conversion warnings in TimeStamp r=froydnj 2019-11-20 21:06:33 +00:00
TimeStamp_posix.cpp
TimeStamp_windows.cpp Bug 1601796 - Use GetSystemTimePreciseAsFileTime instead of GetSystemTime+SystemTimeToFileTime. r=mayhemer,aklotz 2020-01-08 16:53:17 +00:00
TimeStamp_windows.h
TimeStamp.cpp
TimeStamp.h
WindowsMapRemoteView.cpp
WindowsMapRemoteView.h
WindowsProcessMitigations.cpp
WindowsProcessMitigations.h
WindowsUnicode.cpp
WindowsUnicode.h
WinUtils.h