Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Unified Diff: tools/valgrind/asan/asan_symbolize.py

Issue 556853003: Hard-code the symbolizer path in asan_symbolize.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/valgrind/asan/asan_symbolize.py
diff --git a/tools/valgrind/asan/asan_symbolize.py b/tools/valgrind/asan/asan_symbolize.py
index b7a73355e9ebfdd169b3e9978d3e58b247ace899..ba8d69859fdb290451c6d1d1f931520004e1f316 100755
--- a/tools/valgrind/asan/asan_symbolize.py
+++ b/tools/valgrind/asan/asan_symbolize.py
@@ -32,8 +32,22 @@ def disable_buffering():
os.environ['PYTHONUNBUFFERED'] = 'x'
+def set_symbolizer_path():
+ """Set the path to the llvm-symbolize binary in the Chromium source tree."""
+ if not os.environ.get('LLVM_SYMBOLIZER_PATH'):
+ script_dir = os.path.dirname(os.path.abspath(__file__))
+ # Assume this script resides three levels below src/ (i.e.
+ # src/tools/valgrind/asan/).
+ src_root = os.path.join(script_dir, "..", "..", "..")
+ symbolizer_path = os.path.join(src_root, 'third_party',
+ 'llvm-build', 'Release+Asserts', 'bin', 'llvm-symbolizer')
+ assert(os.path.isfile(symbolizer_path))
+ os.environ['LLVM_SYMBOLIZER_PATH'] = os.path.abspath(symbolizer_path)
+
+
def main():
disable_buffering()
+ set_symbolizer_path()
asan_symbolize.demangle = True
asan_symbolize.fix_filename_patterns = sys.argv[1:]
asan_symbolize.logfile = sys.stdin
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698