coff: decode Base64 section-name offsets for large coverage objects - #942
Closed
honkstar1 wants to merge 1 commit into
Closed
coff: decode Base64 section-name offsets for large coverage objects#942honkstar1 wants to merge 1 commit into
honkstar1 wants to merge 1 commit into
Conversation
honkstar1
force-pushed
the
codex/radlink-coff-base64-pr
branch
from
September 10, 2026 00:04
14625bf to
25ef98c
Compare
Collaborator
|
manually merged in: 6380ab2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
//followed by a most-significant-first Base64 string-table offset./offsetreferences unchanged, and bounds-check indirect offsets before reading the string table.Problem
Large coverage-instrumented COFF objects can have string tables whose section-name offsets exceed 9,999,999. LLVM then emits names such as
//AAyPM2(offset 13,169,462) for.lcovfun$M. Interpreting this as a decimal reference produces bogus output-section names. The coverage records remain in the executable but are no longer discoverable byllvm-cov, resulting in function/profile mismatch warnings and incomplete reports.This fixes section-name decoding rather than changing COMDAT selection, coverage instrumentation, or executable code generation. The change also applies to other long section names using this encoding.
Validation
dev-based release build of radlink and torture; both COFF tests pass.llvm-cov showcommands succeed with empty stderr. Coverage function/region/line/branch totals match lld-link.Based directly on
dev; no dependency on the other open radlink PRs.