forked from OSchip/llvm-project
[asan] Allow users of asan_symbolize.py to forbid fallback to atos/addr2line.
llvm-svn: 231492
This commit is contained in:
parent
6b42f2d8aa
commit
4a792988b3
|
@ -23,6 +23,7 @@ sysroot_path = None
|
||||||
binary_name_filter = None
|
binary_name_filter = None
|
||||||
fix_filename_patterns = None
|
fix_filename_patterns = None
|
||||||
logfile = sys.stdin
|
logfile = sys.stdin
|
||||||
|
allow_system_symbolizer = True
|
||||||
|
|
||||||
# FIXME: merge the code that calls fix_filename().
|
# FIXME: merge the code that calls fix_filename().
|
||||||
def fix_filename(file_name):
|
def fix_filename(file_name):
|
||||||
|
@ -392,6 +393,8 @@ class SymbolizationLoop(object):
|
||||||
[BreakpadSymbolizerFactory(binary), self.llvm_symbolizers[binary]])
|
[BreakpadSymbolizerFactory(binary), self.llvm_symbolizers[binary]])
|
||||||
result = symbolizers[binary].symbolize(addr, binary, offset)
|
result = symbolizers[binary].symbolize(addr, binary, offset)
|
||||||
if result is None:
|
if result is None:
|
||||||
|
if not allow_system_symbolizer:
|
||||||
|
raise Exception('Failed to launch or use llvm-symbolizer.')
|
||||||
# Initialize system symbolizer only if other symbolizers failed.
|
# Initialize system symbolizer only if other symbolizers failed.
|
||||||
symbolizers[binary].append_symbolizer(
|
symbolizers[binary].append_symbolizer(
|
||||||
SystemSymbolizerFactory(self.system, addr, binary))
|
SystemSymbolizerFactory(self.system, addr, binary))
|
||||||
|
|
Loading…
Reference in New Issue