[PATCH] D71148: [hwasan] Offline symbolization script.
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 09:28:32 PST 2019
hctim accepted this revision.
hctim added a comment.
This revision is now accepted and ready to land.
LGTM with a couple comments
================
Comment at: compiler-rt/lib/hwasan/scripts/hwasan_symbolize:119
+ #0 0x7f6e35cf2e45 (/blah/foo.so+0x11fe45)
+ match = re.match(r'^(.*?)#([0-9]+)( *)(0x[0-9a-f]+) *\((.*)\+(0x[0-9a-f]+)\)', line, re.UNICODE)
+ if match:
----------------
I think a lot of `.*?`'s here can be replaced with `\s*` for stability:
`(\s*)#(\d+)\s*(0x[0-9a-f]+)\s*\((.*)\+(0x[0-9a-f]+)\)`
================
Comment at: compiler-rt/lib/hwasan/scripts/hwasan_symbolize:184
+
+
+parser = argparse.ArgumentParser()
----------------
Nit: extra line
================
Comment at: compiler-rt/lib/hwasan/scripts/hwasan_symbolize:219
+# 4. if inside Android platform, prebuilt binary at a known path
+# 5. highest available version in /usr/bin
+symbolizer_path = args.symbolizer
----------------
Needs to be updated to talk about PATH
================
Comment at: compiler-rt/lib/hwasan/scripts/hwasan_symbolize:247
+ for path in os.environ["PATH"].split(os.pathsep):
+ candidates = glob.glob(os.path.join(path, 'llvm-symbolizer-*'))
+ if len(candidates) > 0:
----------------
We'll miss `llvm-symbolizer` in a user's PATH here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71148/new/
https://reviews.llvm.org/D71148
More information about the llvm-commits
mailing list