[compiler-rt] r348659 - Fix IOError exception being raised in `asan_symbolize.py`crash when
Dan Liew via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 7 14:14:21 PST 2018
Author: delcypher
Date: Fri Dec 7 14:14:20 2018
New Revision: 348659
URL: http://llvm.org/viewvc/llvm-project?rev=348659&view=rev
Log:
Fix IOError exception being raised in `asan_symbolize.py`crash when
using `atos` symbolizer on Darwin when the binaries don't exist.
For now we just produce an unsymbolicated stackframe when the binary
doesn't exist.
Modified:
compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py
Modified: compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py?rev=348659&r1=348658&r2=348659&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py (original)
+++ compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py Fri Dec 7 14:14:20 2018
@@ -231,6 +231,10 @@ class DarwinSymbolizer(Symbolizer):
"""Overrides Symbolizer.symbolize."""
if self.binary != binary:
return None
+ if not os.path.exists(binary):
+ # If the binary doesn't exist atos will exit which will lead to IOError
+ # exceptions being raised later on so just don't try to symbolize.
+ return ['{} ({}:{}+{})'.format(addr, binary, self.arch, offset)]
atos_line = self.atos.convert('0x%x' % int(offset, 16))
while "got symbolicator for" in atos_line:
atos_line = self.atos.readline()
More information about the llvm-commits
mailing list