[PATCH] D75633: [hwasan_symbolize] Make hwasan_symbolize compatible with Android fuzzing out-of-box.
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 11:47:57 PST 2020
hctim created this revision.
hctim added a reviewer: eugenis.
Herald added projects: Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers.
hwasan_symbolize assumes that all the symoblized binaries and DSO's are under $ANDROID_PRODUCT_OUT/symbols. This is not the case
with cc_fuzz targets on Android, as they have fully symbolized binaries and DSO/s under $ANDROID_PRODUCT_OUT/data/fuzz, with
no corresponding entry under /symbols.
Add just the raw $ANDROID_PRODUCT_OUT as a symbol search path.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75633
Files:
compiler-rt/lib/hwasan/scripts/hwasan_symbolize
Index: compiler-rt/lib/hwasan/scripts/hwasan_symbolize
===================================================================
--- compiler-rt/lib/hwasan/scripts/hwasan_symbolize
+++ compiler-rt/lib/hwasan/scripts/hwasan_symbolize
@@ -200,6 +200,9 @@
if 'ANDROID_PRODUCT_OUT' in os.environ:
product_out = os.path.join(os.environ['ANDROID_PRODUCT_OUT'], 'symbols')
binary_prefixes.append(product_out)
+ # The Android fuzzing `/data/fuzz` out directory contains executables with
+ # symbols.
+ binary_prefixes.append(os.environ['ANDROID_PRODUCT_OUT'])
for p in binary_prefixes:
if not os.path.isdir(p):
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75633.248265.patch
Type: text/x-patch
Size: 625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200304/4b485849/attachment.bin>
More information about the llvm-commits
mailing list