Page MenuHomePhabricator

[compiler-rt] Symbolizer refactoring: Link symbolizer tools into a fallback chain
ClosedPublic

Authored by kubamracek on Mar 3 2015, 4:08 PM.

Details

Reviewers
samsonov
Summary

Part of http://reviews.llvm.org/D7827. Although we currently always use only one (or zero) symbolizer tool from POSIXSymbolizer, let's prepare a "fallback chain", which will be useful in the planned atos- and dladdr-based symbolizers.

Diff Detail

Event Timeline

kubamracek updated this revision to Diff 21155.Mar 3 2015, 4:08 PM
kubamracek retitled this revision from to [compiler-rt] Symbolizer refactoring: Link symbolizer tools into a fallback chain.
kubamracek updated this object.
kubamracek edited the test plan for this revision. (Show Details)
kubamracek added subscribers: Unknown Object (MLST), zaks.anna, samsonov.
samsonov added inline comments.Mar 3 2015, 4:29 PM
lib/sanitizer_common/sanitizer_symbolizer_internal.h
31

You need a SymbolizerTool constructor that would initialize next to nullptr. Also, add a comment here why you need it.

lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
353–354

Consider just taking IntrusiveList<SymbolizerTool> as an input parameter. Otherwise you:

  • need to call tools_.clear() in constructor anyway
  • introduce an implicit assertion that AppendSymbolizerTool should be called before using any other methods.
369

Why not just return here?

389

ditto

kubamracek updated this revision to Diff 21180.Mar 4 2015, 1:45 AM

Addressing review comments.

samsonov accepted this revision.Mar 4 2015, 12:21 PM
samsonov added a reviewer: samsonov.

LGTM, but please address the comment.

lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc
354

IntrusiveList is designed to be a POD, I think it would be easier to just pass it by value and copy it...

519

That is, no need to call to symbolizer_allocator_ here, just

IntrusiveList<SymbolizerTool> list;
list.clear();
//...
return new(symbolizer_allocator_) POSIXSymbolizer(list);
This revision is now accepted and ready to land.Mar 4 2015, 12:21 PM
kubamracek closed this revision.Mar 5 2015, 1:49 AM

Landed in r231361.