Parse value expressions printed on separate lines#70
Merged
Conversation
56acdc4 to
e7847a1
Compare
jordalgo
reviewed
Sep 4, 2025
| // the exprs to the state of the _previous_ instruction | ||
| const prevIdx = siblingInsLine(lines, idx, -1); | ||
| const prevLine = <InstructionLine>lines[prevIdx]; | ||
| if (prevIdx < idx) { |
Collaborator
There was a problem hiding this comment.
Is this check necessary?
Collaborator
Author
There was a problem hiding this comment.
Seems like it'll only trigger for idx=0.
jordalgo
reviewed
Sep 4, 2025
src/analyzer.ts
Outdated
| ins.writes = ["r0", ...BPF_SCRATCH_REGS]; | ||
| } | ||
|
|
||
| function updateBpfStateExprs( |
Collaborator
There was a problem hiding this comment.
naming nit - maybe updatePrevInsBpfState
jordalgo
approved these changes
Sep 4, 2025
Verifier in some cases may print information about known values
separately from the relevant instruciton, for example:
100: (85) call bpf_ringbuf_reserve#131
101: frame1: R0=ringbuf_mem_or_null(id=5,ref_obj_id=5,sz=196) refs=5
101: (bf) r7 = r0 ; frame1: R0=ringbuf_mem_or_null(id=5,ref_obj_id=5,sz=196) R7_w=ringbuf_mem_or_null(id=5,ref_obj_id=5,sz=196) refs=5
Note that second line contains state produced by instrcution at 100.
Implement parsing these messages and incorporating the information
from them in the computed array of BpfState objects.
e7847a1 to
79078af
Compare
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.
Verifier in some cases may print information about known values
separately from the relevant instruciton, for example:
Note that second line contains state produced by instrcution at 100.
Implement parsing these messages and incorporating the information
from them in the computed array of BpfState objects.