Repository navigation
Fix enum constant assignments to locals - #102
Merged
Merged
Conversation
Every read of a bare name resolves local, then BPF global, then vmlinux enum constant, except the allocation pass's variable-to-variable path, which stopped after the globals and rejected `act = XDP_PASS` with "source variable not found", while `act = XDP_PASS + 0` compiled through the binop path. The error text pointed the wrong way: it is the target that needs a stack slot, and the pass could not type it. An enum constant is an immediate with no storage of its own, so the target gets the i64 slot a literal gets, and the constant is folded at the store. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
failing_tests/vmlinux/assignment_handling.py pinned exactly this gap
("This gives an error, but / this does not"); it moves to the passing
suite and its xfail entry goes. enum_to_local.py adds the C shape
`int act = XDP_PASS; if (...) act = XDP_DROP; return act;`.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
No description provided.