[PATCH] D35963: [DWARF] Added verification check for tags in accelerator tables. This patch verifies that the atom tag is actually the same with the tag of the DIE that we retrieve from the table.
Spyridoula Gravani via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 31 11:02:27 PDT 2017
sgravani marked 2 inline comments as done.
sgravani added inline comments.
================
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:534
+ auto Atoms = AccelTable.readAtoms(HashDataOffset);
+ auto Die = DCtx.getDIEForOffset(std::get<0>(Atoms));
+ if (!Die) {
----------------
aprantl wrote:
> I think something like this would be more readable:
> ```
> unsigned Offset;
> unsigned Tag;
> std::tie(Offset, Tag) = AccelTable.readAtoms(HashDataOffset);
> ```
I followed the advice, thanks!
================
Comment at: test/tools/llvm-dwarfdump/X86/apple_types_verify_tag.s:121
+ .long 52
+ .short 31 ## error: Tag DW_TAG_ptr_to_member_type in accelerator table does not match Tag DW_TAG_base_type of DIE[0].
+ .byte 0
----------------
aprantl wrote:
> Where's the CHECK?
beginning of test:
# CHECK: Verifying .apple_types...
# CHECK-NEXT: error: Tag DW_TAG_ptr_to_member_type in accelerator table does not match Tag DW_TAG_base_type of DIE[0].
https://reviews.llvm.org/D35963
More information about the llvm-commits
mailing list