[compiler-rt] r248962 - [asan] Fix asan_symbolize.py handling of non-existing paths
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 16:17:40 PDT 2015
Author: eugenis
Date: Wed Sep 30 18:17:39 2015
New Revision: 248962
URL: http://llvm.org/viewvc/llvm-project?rev=248962&view=rev
Log:
[asan] Fix asan_symbolize.py handling of non-existing paths
Added:
compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc
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=248962&r1=248961&r2=248962&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py (original)
+++ compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py Wed Sep 30 18:17:39 2015
@@ -164,8 +164,8 @@ class Addr2LineSymbolizer(Symbolizer):
file_name = self.pipe.stdout.readline().rstrip()
if is_first_frame:
is_first_frame = False
- elif function_name == '??':
- assert file_name == '??:0'
+ elif function_name in ['', '??']:
+ assert file_name == function_name
break
lines.append((function_name, file_name));
except Exception:
Added: compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc?rev=248962&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc (added)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/asan-symbolize-bad-path.cc Wed Sep 30 18:17:39 2015
@@ -0,0 +1,4 @@
+// Test that asan_symbolize does not hang when provided with an non-existing
+// path.
+// RUN: echo '#0 0xabcdabcd (%T/bad/path+0x1234)' | %asan_symbolize | FileCheck %s
+// CHECK: #0 0xabcdabcd
More information about the llvm-commits
mailing list