[PATCH] D44404: [ASan] Report proper ASan error on allocator failures instead of CHECK(0)-ing

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 16 15:30:53 PDT 2018


eugenis added inline comments.


================
Comment at: lib/asan/asan_allocator.cc:171
+    if (UNLIKELY(!res)) {
+      GET_STACK_TRACE_FATAL_HERE;
+      ReportOutOfMemory(size, &stack);
----------------
This will not work with fast_unwind_on_fatal because there are no frame pointers. How hard is it to pass the stack down from the caller?


================
Comment at: lib/asan/asan_errors.h:26
   explicit ErrorBase(u32 tid_) : tid(tid_) {}
+  ErrorBase(u32 tid_, int initial_score, const char *reason) : tid(tid_) {
+    scariness.Clear();
----------------
Please update existing error objects with this constructor, too. Either before or after this patch.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D44404





More information about the llvm-commits mailing list