[PATCH] D93907: Make gCrashRecoveryEnabled atomic

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 13:04:49 PST 2021


MaskRay added inline comments.


================
Comment at: llvm/lib/Support/CrashRecoveryContext.cpp:147
   std::lock_guard<std::mutex> L(*gCrashRecoveryContextMutex);
-  if (!gCrashRecoveryEnabled)
+  if (!(gCrashRecoveryEnabled--))
     return;
----------------
```
if (--gCrashRecoveryEnabled == 0)
  uninstallExceptionOrSignalHandlers();
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93907/new/

https://reviews.llvm.org/D93907



More information about the llvm-commits mailing list