[PATCH] D20977: [LibFuzzer] Fix fuzzer-oom.test on OSX.
Dan Liew via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 3 11:35:22 PDT 2016
delcypher created this revision.
delcypher added reviewers: kcc, aizatsky.
delcypher added subscribers: llvm-commits, kcc, aizatsky, zaks.anna, kubabrecka, dcoughlin.
[LibFuzzer] Fix fuzzer-oom.test on OSX.
On OSX (and other platforms) the `__sanitizer_print_memory_profile()`
sanitizer runtime function is not available so print out the text
`Live Heap Allocations:` to keep the ``fuzzer-oom.test`` happy.
In the future if we want to better test information about the live
heap allocations we will should split that out into a separate test
that can be disabled depending on the host platform.
http://reviews.llvm.org/D20977
Files:
lib/Fuzzer/FuzzerLoop.cpp
Index: lib/Fuzzer/FuzzerLoop.cpp
===================================================================
--- lib/Fuzzer/FuzzerLoop.cpp
+++ lib/Fuzzer/FuzzerLoop.cpp
@@ -236,6 +236,8 @@
Printf(" To change the out-of-memory limit use -rss_limit_mb=<N>\n\n");
if (EF.__sanitizer_print_memory_profile)
EF.__sanitizer_print_memory_profile(50);
+ else
+ Printf("Live Heap Allocations: UNAVAILABLE\n");
DumpCurrentUnit("oom-");
Printf("SUMMARY: libFuzzer: out-of-memory\n");
PrintFinalStats();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20977.59587.patch
Type: text/x-patch
Size: 509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160603/9f36aba2/attachment.bin>
More information about the llvm-commits
mailing list