[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:
Kuba Brecka 2015-11-30 14:12:47 +00:00
parent 6c9122ffba
commit 4809b1dca1
1 changed files with 6 additions and 0 deletions

View File

@ -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