Hi everyone,
based on the discussion at https://groups.google.com/d/topic/address-sanitizer/2UaT7rvhvJ4/discussion about different symbolizers, especially on OS X, this patch implements a "fallback" symbolizer for OS X that uses the atos command line tool, which already ships with OS X. The main reason for that is to have easier deployment to machines that don't have llvm-symbolizer. Even though it was pointed out that atos may not be as accurate, having a backup symbolizer is still useful for issue suppressions, where one of the suppression types rely on having a working symbolizer.
As also discussed, the "real" long-term solution is to have internal_symbolizer (llvm-symbolizer built as a standalone static library) being built as part of the LLVM build, but that requires a significant amount of work. This atos patch is mostly meant to have something that works in the meantime.
I tried to keep the changes to existing code in sanitizer_symbolizer_posix_libcdep.cc minimal, so I reused the POSIXSymbolizer and added the AtosSymbolizer as another variant of an external symbolizer (a subclass of ExternalSymbolizerInterface). It would maybe make more sense to subclass SymbolizerProcess but that would require more refactoring. The POSIXSymbolizer class is also already very tied to how llvm-symbolizer works, and probably should also be refactored to allow using another tool/format.
That being said, this patch may be sub-optimal from the refactoring point of view, and I'll be glad to redo it properly, but first I'd like to ask if I'm on the right track or if this should be implemented in a completely different way.
Thanks,
Kuba
Please swap this line with the previous one.