[PATCH] D30101: [asan] Implement "scribble" flag, which overwrites free'd memory with 0x55
Kostya Serebryany via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 29 17:31:39 PDT 2017
kcc added inline comments.
================
Comment at: lib/asan/asan_flags.cc:98
+ // Support macOS MallocScribble and MallocPreScribble:
+ // <https://developer.apple.com/library/content/documentation/Performance/
----------------
Put this under if (SANITIZER_MAC) or something.
AFIACT, there is no such standard env var on other platforms.
================
Comment at: test/asan/TestCases/scribble.cc:3
+// RUN: %run %t 2>&1 | FileCheck --check-prefix=CHECK-NOSCRIBBLE %s
+// RUN: env MallocScribble=1 MallocPreScribble=1 %run %t 2>&1 | FileCheck --check-prefix=CHECK-SCRIBBLE %s
+
----------------
add one more test with ASAN_OPTIONS instead of Mac-specific options.
https://reviews.llvm.org/D30101
More information about the llvm-commits
mailing list