This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Suppress the deprecation warning from atos that breaks AtosSymbolizer on OSX 10.9
ClosedPublic

Authored by glider on Mar 24 2015, 3:16 AM.

Details

Summary

On OS X 10.9 /usr/bin/atos prints the following warning upon invocation:

 -- 
Warning: /usr/bin/atos is moving and will be removed from a future OS X release.
It is now available in the Xcode developer tools to be invoked via: `xcrun atos`
To silence this warning, pass the '-d' command-line flag to this tool.
 --

AtosSymbolizer treats the warning as the symbolization result for the first PC passed to the symbolizer. As a result, for each of the following PCs the file:line info for the previous PC is printed, e.g.:

==97926==ERROR: AddressSanitizer: attempting double-free on 0x60200000dfb0 in thread T0:
==97926==Using atos at user-specified path: /usr/bin/atos
==97926==Using dladdr symbolizer.
   #0 0x1007407e0 in  --  (+0x427e0)
   #1 0x1006f6f25 in wrap_free asan_malloc_mac.cc:114
   #2 0x7fff916e05fc in main atos-symbolizer.cc:17
   #3 0x0  (<unknown module>)

Unfortunately atos doesn't accept the -d switch on OSX versions other than 10.9, thus we have to check for the OSX version.

Diff Detail

Event Timeline

glider updated this revision to Diff 22548.Mar 24 2015, 3:16 AM
glider retitled this revision from to [ASan] Suppress the deprecation warning from atos that breaks AtosSymbolizer on OSX 10.9.
glider updated this object.
glider edited the test plan for this revision. (Show Details)
glider added reviewers: kubamracek, samsonov.
glider updated this object.
glider updated this object.
glider added a subscriber: Unknown Object (MLST).
kubamracek added inline comments.Mar 24 2015, 5:21 AM
sanitizer_symbolizer_mac.cc
61

I think this needs to be >= rather than ==.

glider added inline comments.Mar 24 2015, 6:19 AM
sanitizer_symbolizer_mac.cc
61

Didn't you say atos doesn't support -d on Yosemite?

kubamracek added inline comments.Mar 24 2015, 6:21 AM
sanitizer_symbolizer_mac.cc
61

Oh, you're right, sorry. Please disregard this then.

samsonov accepted this revision.Mar 24 2015, 11:00 AM
samsonov edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 24 2015, 11:00 AM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in rL233180.