summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/fuzzer/FuzzerExtFunctions.def
diff options
context:
space:
mode:
authorJake Ehrlich <jakehehrlich@google.com>2019-09-17 00:34:41 +0000
committerJake Ehrlich <jakehehrlich@google.com>2019-09-17 00:34:41 +0000
commit4b23c24bc8ec84ab443df42c9fdfc74de964febb (patch)
tree21f3bb16d21d5c9286ebe3ce8679dff455daa2c9 /compiler-rt/lib/fuzzer/FuzzerExtFunctions.def
parent895eae309943428634cca1fde9e8bf3a6c171acf (diff)
downloadbcm5719-llvm-4b23c24bc8ec84ab443df42c9fdfc74de964febb.tar.gz
bcm5719-llvm-4b23c24bc8ec84ab443df42c9fdfc74de964febb.zip
[libFuzzer] Always print DSO map on Fuchsia libFuzzer launch
Fuchsia doesn't have /proc/id/maps, so it relies on the kernel logging system to provide the DSO map to be able to symbolize in the context of ASLR. The DSO map is logged automatically on Fuchsia when encountering a crash or writing to the sanitizer log for the first time in a process. There are several cases where libFuzzer doesn't encounter a crash, e.g. on timeouts, OOMs, and when configured to print new PCs as they become covered, to name a few. Therefore, this change always writes to the sanitizer log on startup to ensure the DSO map is available in the log. Author: aarongreen Differential Revision: https://reviews.llvm.org/D66233 llvm-svn: 372056
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerExtFunctions.def')
-rw-r--r--compiler-rt/lib/fuzzer/FuzzerExtFunctions.def1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerExtFunctions.def b/compiler-rt/lib/fuzzer/FuzzerExtFunctions.def
index 7b53b085560..51edf8444e9 100644
--- a/compiler-rt/lib/fuzzer/FuzzerExtFunctions.def
+++ b/compiler-rt/lib/fuzzer/FuzzerExtFunctions.def
@@ -33,6 +33,7 @@ EXT_FUNC(__sanitizer_install_malloc_and_free_hooks, int,
(void (*malloc_hook)(const volatile void *, size_t),
void (*free_hook)(const volatile void *)),
false);
+EXT_FUNC(__sanitizer_log_write, void, (const char *buf, size_t len), false);
EXT_FUNC(__sanitizer_purge_allocator, void, (), false);
EXT_FUNC(__sanitizer_print_memory_profile, void, (size_t, size_t), false);
EXT_FUNC(__sanitizer_print_stack_trace, void, (), true);
OpenPOWER on IntegriCloud