HomePhabricator

[DWARF] Fix v5 debug_line parsing of prologues with many files

Authored by labath on Mar 20 2020, 7:27 AM.

Description

[DWARF] Fix v5 debug_line parsing of prologues with many files

Summary:
The directory_count and file_name_count fields are (section 6.2.4 of
DWARF5 spec) supposed to be uleb128s, not bytes. This bug meant that it
was not possible to correctly parse headers with more than 128 files or
directories.

I've found this bug by code inspection, though the limit is so small
someone would have run into it for real sooner or later. I've verified
that the producer side handles many files correctly, and that we are
able to parse such files after this fix.

Reviewers: dblaikie, jhenderson

Subscribers: aprantl, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76498

Details

Committed
labathMar 24 2020, 7:11 AM
Differential Revision
D76498: [DWARF] Fix v5 debug_line parsing of prologues with many files
Parents
rG7802be4a3d86: [SelDag] Add FREEZE
Branches
Unknown
Tags
Unknown