Repository navigation
fix(apple): preserve leading U+FEFF in load-command strings - #2434
Closed
Aurantium-47 wants to merge 1 commit into
Closed
Aurantium-47 wants to merge 1 commit into
Aurantium-47 wants to merge 1 commit into
Conversation
Assisted-by: OpenAI GPT-6 <noreply@openai.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Owner
|
Thanks @Aurantium-47 for identifying that a leading U+FEFF can be meaningful content in Mach-O load-command strings. That diagnosis helped make the decoder’s content-preservation requirement clear; main already had the equivalent fix from #2110 (main). |
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.
Withdrawn as a duplicate of #2110. That earlier PR already applies the same
ignoreBOM: truecorrection to the Mach-O load-command decoder and covers it with parser and CLI regressions. My earlier duplicate check missed it; closing this PR to avoid duplicating the existing work.Summary
Preserve a leading U+FEFF in Mach-O load-command strings. A dependency spelled
\uFEFF@rpath/libcore.dylibwas being read as@rpath/libcore.dylib, which could maketrace-dylib-resolutionreport a successful match to a different name.Problem and expected behavior
TextDecoderremoves an initial UTF-8 BOM by default. Anlc_stris an embedded NUL-terminated pathname or environment string, so those bytes belong to its value. Apple's format definition requires matching library pathnames. This source-discovered bug has no linked issue; related issues and PRs were checked before implementation.Change and scope
Set
ignoreBOM: truein the existingcommandStringdecoder. The same owner serves dylib IDs and dependencies, rpaths, and embedded dyld environment strings. Fatal UTF-8 validation remains enabled. This is an ordinary static-inspection fix within existing scope; advance maintainer scope approval is not applicable.Contract and boundary impact
Evidence and regression coverage
undeterminedresolution because its runtime-relative base is unknown. The ordinary@rpathname still resolves toContents/Frameworks/libcore.dylib.Validation performed
chmod(000)semantics were excluded from that selection.npm run check— six tasks and architecture guards passed, with no lint errors.npm run verify:test-discovery— all 1,004 test files discovered exactly once.git diff --check— passed.The fixtures exercise REA's actual static CLI, not dyld execution or a disassembler engine. No new real-provider capability is claimed.
Before merge
AI assistance: OpenAI GPT-6 assisted with implementation and verification.