[PATCH] D12318: [ASan] Enable optional ASan recovery

Yury Gribov via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 13:49:27 PDT 2015


ygribov added inline comments.

================
Comment at: include/clang/Basic/Sanitizers.h:82
@@ +81,3 @@
+/// Returns a non-zero SanitizerMask, or \c 0 if \p Value is not known.
+const char *getSanitizerName(SanitizerKind::SanitizerOrdinal SO);
+
----------------
samsonov wrote:
> Do you actually use it anywhere?
No, that's remains of some removed code.

================
Comment at: lib/CodeGen/BackendUtil.cpp:214
@@ -209,3 +213,3 @@
                                             legacy::PassManagerBase &PM) {
   PM.add(createAddressSanitizerFunctionPass(/*CompileKernel*/true));
   PM.add(createAddressSanitizerModulePass(/*CompileKernel*/true));
----------------
samsonov wrote:
> Is recovery supposed to work for -fsanitize=kernel-address? Should you mark it as Unrecoverable?
KAsan is actually recoverable by default. Perhaps I should do explicit Recover for CompileKernel as well.

================
Comment at: lib/asan/asan_internal.h:129
@@ +128,3 @@
+    // This is racy but we don't need 100% correctness.
+    if (is_error) ++num_reported_errors;
+  }
----------------
samsonov wrote:
> We have atomic_fetch_add
Yeah but it may be slower.


Repository:
  rL LLVM

http://reviews.llvm.org/D12318





More information about the llvm-commits mailing list