[all-commits] [llvm/llvm-project] 12285c: [DWARF] Use ULEB128 and not just one byte for dire...
Daniel Rodríguez Troitiño via All-commits
all-commits at lists.llvm.org
Tue Sep 24 10:55:57 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 12285cca5ed713dfd483bd96422a5607b8af0085
https://github.com/llvm/llvm-project/commit/12285cca5ed713dfd483bd96422a5607b8af0085
Author: Daniel Rodríguez Troitiño <drodriguez at users.noreply.github.com>
Date: 2024-09-24 (Tue, 24 Sep 2024)
Changed paths:
M llvm/lib/DWARFLinker/Classic/DWARFStreamer.cpp
M llvm/lib/DWARFLinker/Parallel/DebugLineSectionEmitter.h
A llvm/test/tools/dsymutil/X86/dwarf5-many-include-directories.test
Log Message:
-----------
[DWARF] Use ULEB128 and not just one byte for directory indices (#109067)
According to the standard `DW_LNCT_directory_index` can be `data1`,
`data2`, or `udata` (see 6.2.4.1). The code was using `data1`, but this
limits the number of directories to 256, even if the variable holding
the directory index is a `uint64_t`. `dsymutil` was hitting an assertion
when trying to write directory indices higher than 255.
Modify the classic and the parallel DWARF linkers to use `udata` and
encode the directory indices as ULEB128 and provide a test that has more
than 256 directories to check the changes are working as expected.
For people that were using `dsymutil` with CUs that had between 128-256
directories, this will mean that for those indices 2 bytes will be used
now, instead of just one.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list