fix: handle missing version node for synthetic symbols#1924
Open
kimjune01 wants to merge 1 commit into
Open
Conversation
…ymbols Add unit test verifying that version_for_symbol errors when a symbol references a version node that does not exist in the version script. Also add integration test for linker script assignments with undefined version nodes. Fix: check version_name even when version_count is 0, so that symbols with explicit @Version annotations are validated against the version script regardless of whether any version blocks are defined.
Member
|
Please update the description adhering to https://github.com/wild-linker/wild/blob/main/CONTRIBUTING.md#llm--ai-use-policy |
Author
|
Updated description per CONTRIBUTING.md. Here's the investigation trace: Investigation trace for #1915:
Wrong approach rejected: H1 — an overly broad guard broke existing versioned symbol handling. First submission gate-failed on this. H2 narrows the check to only synthetic symbols with missing nodes. AI was used to assist with investigation and implementation. I reviewed and understand the change. |
Member
|
Where did that "investigation trace" come from? |
marxin
reviewed
May 13, 2026
| } | ||
|
|
||
| #[test] | ||
| fn undefined_version_name_errors() { |
Collaborator
There was a problem hiding this comment.
I would not probably introduce a synthetic test-case like this.
Author
There was a problem hiding this comment.
I'll rm when I get a chance later
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.
Synthetic symbols like
__ehdr_startcan lack version nodes when a version script is present. This causes a panic during version node lookup. The fix adds a fallback for missing nodes.New test
version-node-not-foundcovers the scenario.Fixes #1915
I used an LLM as an aid while working on this change; I reviewed and understand the implementation.