[libFuzzer] Always print DSO map on Fuchsia libFuzzer launch
authorJake Ehrlich <jakehehrlich@google.com>
Tue, 17 Sep 2019 00:34:41 +0000 (00:34 +0000)
committerJake Ehrlich <jakehehrlich@google.com>
Tue, 17 Sep 2019 00:34:41 +0000 (00:34 +0000)
commit4b23c24bc8ec84ab443df42c9fdfc74de964febb
tree21f3bb16d21d5c9286ebe3ce8679dff455daa2c9
parent895eae309943428634cca1fde9e8bf3a6c171acf
[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
compiler-rt/lib/fuzzer/FuzzerExtFunctions.def
compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp