This is an archive of the discontinued LLVM Phabricator instance.

[Symbolizer] Ignore unknown additional symbolizer markup fields
ClosedPublic

Authored by mysterymath on Jun 26 2023, 5:01 PM.

Details

Summary

The symbolizer markup syntax is structured such that fields require only
previous fields for their interpretation; this was originally intended
to make adding new fields a natural extension mechanism for existing
elements. This codifies this into the spec and makes the behavior of the
llvm-symbolizer match. Extra fields are now warned about, but ignored,
rather than ignoring the whole element.

Diff Detail

Event Timeline

mysterymath created this revision.Jun 26 2023, 5:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2023, 5:01 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
mysterymath requested review of this revision.Jun 26 2023, 5:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2023, 5:01 PM
mcgrathr accepted this revision.Jun 26 2023, 5:18 PM
mcgrathr added inline comments.
llvm/lib/DebugInfo/Symbolize/MarkupFilter.cpp
136–137

I don't know of a reason to print anything at all when a reset element is encountered.

llvm/test/DebugInfo/symbolize-filter-markup-reset.test
24–26

A trailing colon is an odd case, though I see no reason not to accept it. But it's never what an expected future extension would look like. Probably the test should cover reset:this=1:that, etc.

This revision is now accepted and ready to land.Jun 26 2023, 5:18 PM
mysterymath marked an inline comment as done.

Update test cases.

llvm/lib/DebugInfo/Symbolize/MarkupFilter.cpp
136–137

This is mostly just to provide context for error messages; it would be highly surprising to see a "no mmap covers address" error not too long after a mmap that appears to cover the address, but where a reset was present in-between.

llvm/test/DebugInfo/symbolize-filter-markup-reset.test
24–26

Good point; the tool is agnostic to what the field looks like, and these tests are fairly white-box, so I've changed these to add an "ext" field to make the purpose of the case clearer.

mysterymath retitled this revision from [Symbolizer] Ignroe unknown additional symbolizer markup fields to [Symbolizer] Ignore unknown additional symbolizer markup fields.Jun 27 2023, 2:56 PM
This revision was landed with ongoing or failed builds.Jun 28 2023, 10:39 AM
This revision was automatically updated to reflect the committed changes.