This is an archive of the discontinued LLVM Phabricator instance.

[libunwind] Add more information to eh_frame_hdr version error
ClosedPublic

Authored by fmayer on Jun 1 2022, 5:20 PM.

Details

Summary

This makes it easier to find the offending ELF file.

Diff Detail

Event Timeline

fmayer created this revision.Jun 1 2022, 5:20 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 1 2022, 5:20 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
fmayer requested review of this revision.Jun 1 2022, 5:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2022, 5:20 PM
MaskRay requested changes to this revision.EditedJun 1 2022, 5:27 PM
MaskRay added a subscriber: MaskRay.

Thanks for adding more information, but In ehdr at is incorrect. .eh_frame_hdr is a section. Its content is not in the ELF header.

This revision now requires changes to proceed.Jun 1 2022, 5:27 PM
fmayer updated this revision to Diff 433598.Jun 1 2022, 5:30 PM

change string

fmayer updated this revision to Diff 433599.Jun 1 2022, 5:31 PM

simplify string

fmayer added a comment.Jun 1 2022, 5:32 PM

Thanks for adding more information, but In ehdr at is incorrect. .eh_frame_hdr is a section. Its content is not in the ELF header.

Removed the "in [...]" as the pointer is exactly the location of the version.

MaskRay accepted this revision.Jun 1 2022, 6:04 PM

LGTM with some minor issues fixed.

The subject line does not end with a period. Please describe why you need extra information in the diagnostic.

libunwind/src/EHHeaderParser.hpp
60

The standard diagnostics do not use capitalization: https://llvm.org/docs/CodingStandards.html#error-and-warning-messages libunwind mostly doesn't use capitalization

61

Use static_cast<uint64_t>. pint_t is 32-bit on ELF32 platforms.

fmayer removed 1 blocking reviewer(s): phosek.Jun 1 2022, 6:10 PM
This revision is now accepted and ready to land.Jun 1 2022, 6:10 PM
fmayer retitled this revision from [libunwind] Add more information to eh_frame_hdr version error. to [libunwind] Add more information to eh_frame_hdr version error.Jun 1 2022, 6:11 PM
fmayer edited the summary of this revision. (Show Details)
fmayer marked 2 inline comments as done.
This revision was landed with ongoing or failed builds.Jun 1 2022, 7:48 PM
This revision was automatically updated to reflect the committed changes.