[compiler-rt] r254301 - [sanitizer] Detect an invalid answer in AtosSymbolizer
Kuba Brecka via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 06:12:47 PST 2015
Author: kuba.brecka
Date: Mon Nov 30 08:12:47 2015
New Revision: 254301
URL: http://llvm.org/viewvc/llvm-project?rev=254301&view=rev
Log:
[sanitizer] Detect an invalid answer in AtosSymbolizer
On OS X, in AtosSymbolizer, if the answer from atos doesn't contain module name, let's bail and return false. There are some cases where this is beneficial, because we'll try DlAddrSymbolizer next (it's next in the symbolizer chain), which might be able to symbolize something that atos couldn't.
Differential Revision: http://reviews.llvm.org/D15071
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc?rev=254301&r1=254300&r2=254301&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_mac.cc Mon Nov 30 08:12:47 2015
@@ -121,6 +121,12 @@ static bool ParseCommandOutput(const cha
const char *rest = trim;
char *symbol_name;
rest = ExtractTokenUpToDelimiter(rest, " (in ", &symbol_name);
+ if (rest[0] == '\0') {
+ InternalFree(symbol_name);
+ InternalFree(trim);
+ return false;
+ }
+
if (internal_strncmp(symbol_name, "0x", 2) != 0)
*out_name = symbol_name;
else
More information about the llvm-commits
mailing list