mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
3694eeda43
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 |
||
---|---|---|
.. | ||
decimal | ||
interceptor | ||
AutoProfilerLabel.cpp | ||
AutoProfilerLabel.h | ||
ConditionVariable_posix.cpp | ||
ConditionVariable_windows.cpp | ||
Debug.h | ||
DynamicallyLinkedFunctionPtr.h | ||
ImportDir.h | ||
moz.build | ||
Mutex_posix.cpp | ||
Mutex_windows.cpp | ||
MutexPlatformData_posix.h | ||
MutexPlatformData_windows.h | ||
NativeNt.h | ||
nsWindowsDllInterceptor.h | ||
PlatformConditionVariable.h | ||
PlatformMutex.h | ||
Printf.cpp | ||
Printf.h | ||
StackWalk_windows.h | ||
StackWalk.cpp | ||
StackWalk.h | ||
TimeStamp_darwin.cpp | ||
TimeStamp_posix.cpp | ||
TimeStamp_windows.cpp | ||
TimeStamp_windows.h | ||
TimeStamp.cpp | ||
TimeStamp.h | ||
WindowsMapRemoteView.cpp | ||
WindowsMapRemoteView.h | ||
WindowsProcessMitigations.cpp | ||
WindowsProcessMitigations.h | ||
WindowsUnicode.cpp | ||
WindowsUnicode.h | ||
WinUtils.h |