[PATCH] D20402: Work around crashes in `__sanitizer_malloc_hook()` under Mac OSX.

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 14:20:01 PDT 2016


kcc added a comment.

Yes, this looks ok...


================
Comment at: lib/Fuzzer/FuzzerLoop.cpp:446
@@ +445,3 @@
+void __sanitizer_malloc_hook(void *ptr, size_t size) {
+  if (LIBFUZZER_LINUX) {
+    AllocTracer.Mallocs++;
----------------
aizatsky wrote:
> Maybe if (!LIBFUZZER_APPLY) would be a better condition?
Yea, maybe.. 
if (!LIBFUZZER_APPLE) 

Also, this code tends to not use {} for simple if statements. Same below. 


http://reviews.llvm.org/D20402





More information about the llvm-commits mailing list