This is an archive of the discontinued LLVM Phabricator instance.

[BOLT][DWARF] Fix handling of multiple DW_OP_addrx in an expression
ClosedPublic

Authored by ayermolo on Jul 29 2022, 6:15 PM.

Details

Summary

We were not handling correclty multiple DW_OP_addrx in the location expression.
This was exposed by clang-15 build in release mode with debug information.

Diff Detail

Event Timeline

ayermolo created this revision.Jul 29 2022, 6:15 PM
Herald added a reviewer: Amir. · View Herald Transcript
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Herald added subscribers: hoy, modimo, wenlei. · View Herald Transcript
ayermolo requested review of this revision.Jul 29 2022, 6:15 PM
Herald added a project: Restricted Project. · View Herald Transcript

Thanks to @dblaikie for the unit test. :)

maksfb added inline comments.Jul 29 2022, 6:38 PM
bolt/lib/Rewrite/DWARFRewriter.cpp
668
670

Do you have to update when SizeDiff == 0?

ayermolo added inline comments.Jul 29 2022, 7:59 PM
bolt/lib/Rewrite/DWARFRewriter.cpp
670

ah good point!

ayermolo updated this revision to Diff 448766.Jul 29 2022, 8:02 PM

remove update bool

ayermolo updated this revision to Diff 448767.Jul 29 2022, 8:03 PM
ayermolo marked an inline comment as done.

comment

ayermolo marked an inline comment as done.Jul 29 2022, 8:03 PM
maksfb accepted this revision.Jul 29 2022, 8:30 PM

LGTM

This revision is now accepted and ready to land.Jul 29 2022, 8:30 PM