This is an archive of the discontinued LLVM Phabricator instance.

[DWP][DWARF] Detect and error on debug info offset overflow
ClosedPublic

Authored by ayermolo on Jul 18 2022, 3:15 PM.

Details

Summary

Right now we silently overflow uint32_t for debug_indfo sections. Added a check
and error out.

Diff Detail

Event Timeline

ayermolo created this revision.Jul 18 2022, 3:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2022, 3:15 PM
ayermolo requested review of this revision.Jul 18 2022, 3:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 18 2022, 3:15 PM
ayermolo updated this revision to Diff 445640.Jul 18 2022, 3:17 PM

removed header

@dblaikie Not sure how to test this code path with unit test.

This revision was not accepted when it landed; it landed in state Needs Review.Jul 22 2022, 10:46 AM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
ayermolo added a comment.EditedJul 22 2022, 10:49 AM

@dblaikie accidentally pushed this while pushing https://reviews.llvm.org/D130335.
Want me to revert this commit?

MaskRay added inline comments.
llvm/lib/DWP/DWP.cpp
684

No capitalization or trailing period for diagnostics: https://llvm.org/docs/CodingStandards.html#error-and-warning-messages

At least the following DWPError follows this generic guideline

ayermolo added inline comments.Jul 22 2022, 12:04 PM
llvm/lib/DWP/DWP.cpp
684

ok, will revert and put up a new diff with error message that follows the guideline.