This is an archive of the discontinued LLVM Phabricator instance.

Prefer atos to llvm-symbolizer on Darwin
ClosedPublic

Authored by george.karpenkov on Jul 21 2017, 3:56 PM.

Details

Summary

atos is the default symbolizer on Apple's compiler for quite a few years now.
llvm-symbolizer is quite fragile on Darwin: for example, unless a .dSYM file was explicitly generated symbolication would not work.
It is also very convenient when the behavior of LLVM open source compiler matches to that of Apple's compiler on Apple's platform.
Furthermore, llvm-symbolizer is not installed on Apple's platform by default, which leads to strange behavior during debugging: the test might fail under lit (where it has llvm-symbolizer) but would run properly when launched on the command line (where it does not, and atos would be used).

Indeed, there's a downside: atos does not work properly with inlined functions, hence the test change.
We do not think that this is a major problem, as users would often compile with -O0 when debugging, and in any case it is preferable to symbolizer not being able to symbolize.

Diff Detail

Event Timeline

george.karpenkov updated this revision to Diff 107748.
kcc edited edge metadata.Jul 21 2017, 4:04 PM

Code LG

test/asan/TestCases/suppressions-function.cc
1

I'd prefer if you keep this test unchanged (only extend the UNSUPPORTED) and add a separate test to test/asan/TestCases/Darwin

Applied the comments

george.karpenkov marked an inline comment as done.Jul 21 2017, 4:16 PM
kcc accepted this revision.Jul 21 2017, 4:23 PM

LGTM with a nit
Please remove all non-darwin things (windows, android, etc) from the new file test/asan/TestCases/Darwin/suppressions-function.cc

This revision is now accepted and ready to land.Jul 21 2017, 4:23 PM
This revision was automatically updated to reflect the committed changes.