[PATCH] D40714: Correct atexit(3) support in MSan/NetBSD

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 16:55:35 PST 2017


vitalybuka added inline comments.


================
Comment at: lib/msan/msan_interceptors.cc:1094
+  {
+    // Ensure thread-safety.
+    BlockingMutexLock l(&interceptor_ctx()->atexit_mu);
----------------
comment states obvious 


================
Comment at: lib/msan/msan_interceptors.cc:1141
+
+    // Ensure thread-safety.
+    BlockingMutexLock l(&interceptor_ctx()->atexit_mu);
----------------
comment states obvious 


================
Comment at: lib/msan/msan_interceptors.cc:1144
+
+    res = REAL(__cxa_atexit)((void (*)(void *a))MSanAtExitWrapper, 0, 0);
+    // Push AtExitCtx on the top of the stack of callback functions
----------------
do you need to call REAL(__cxa_atexit) under the lock?


Repository:
  rL LLVM

https://reviews.llvm.org/D40714





More information about the llvm-commits mailing list