forked from OSchip/llvm-project
[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 llvm-svn: 254301
This commit is contained in:
parent
6c9122ffba
commit
4809b1dca1
|
@ -121,6 +121,12 @@ static bool ParseCommandOutput(const char *str, uptr addr, char **out_name,
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue