[PATCH] D76749: [ASan] Fix issue where system log buffer was not cleared after reporting an issue.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 25 21:07:20 PDT 2020


delcypher marked an inline comment as done.
delcypher added inline comments.


================
Comment at: compiler-rt/lib/asan/asan_report.cpp:163
                       error_message_buffer, kErrorMessageBufferSize);
+      if (!halt_on_error_) {
+        // Clear error_message_buffer so that if we find other errors
----------------
vitalybuka wrote:
> why do we need to check halt_on_error_?
> we copied all info line above, we need nothing there in any case
Clearing the buffer is only needed when `halt_on_error_` is false. However the process will soon die when `halt_on_error_` is true so there probably isn't any harm is clearing the buffer unconditionally. I'll update the patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76749





More information about the llvm-commits mailing list