mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
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. llvm-svn: 348659
This commit is contained in:
parent
b5613ecf17
commit
5ab96bf57c
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user