Page MenuHomePhabricator

[asan_symbolize] Fix bug where the frame counter was not incremented.

Authored by delcypher on Jul 30 2019, 6:09 PM.



This bug occurred when a plug-in requested that a binary not be
symbolized while the script is trying to symbolize a stack frame. In
this case self.frame_no would not be incremented. This would cause
subsequent stack frames that are symbolized to be incorrectly numbered.

To fix this get_symbolized_lines() has been modified to take an
argument that indicates whether the stack frame counter should
incremented. In process_line_posix() get_symbolized_lines(None) is
now used in cases where we don't want to symbolize a line so that we can
keep the frame counter increment in a single function.

A test case is included. The test uses a dummy plugin that always asks script to not symbolize the first binary that the
script asks about. Prior to the patch this would cause the output to
script to look something like

#0 0x0
#0 0x0 in do_access
#1 0x0 in main


Diff Detail


Event Timeline

delcypher created this revision.Jul 30 2019, 6:09 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 30 2019, 6:09 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
vitalybuka accepted this revision.Aug 6 2019, 12:57 PM
This revision is now accepted and ready to land.Aug 6 2019, 12:57 PM

@vitalybuka Thanks for the review!

This revision was automatically updated to reflect the committed changes.