pr4.3
This commit is contained in:
parent
7ba1d71b69
commit
de3ccabd62
@ -1,56 +1,3 @@
|
||||
# PR-4.3 — Control Flow and Jump Target Verification
|
||||
|
||||
### Briefing
|
||||
|
||||
The verifier must ensure all control flow transfers are valid and do not jump into the middle of instructions or outside function boundaries.
|
||||
|
||||
### Target
|
||||
|
||||
* Validate all jump targets.
|
||||
* Reject invalid or unsafe control flow.
|
||||
|
||||
### Work items
|
||||
|
||||
* Use canonical layout utilities to identify instruction boundaries.
|
||||
* Verify:
|
||||
|
||||
* Jump targets land on valid instruction boundaries.
|
||||
* Targets are within the function range.
|
||||
* Reject invalid targets with a verifier error.
|
||||
|
||||
### Acceptance checklist
|
||||
|
||||
* [ ] Invalid jump targets are rejected.
|
||||
* [ ] Valid programs pass verification.
|
||||
* [ ] No reliance on runtime traps for these cases.
|
||||
* [ ] `cargo test` passes.
|
||||
|
||||
### Tests
|
||||
|
||||
* Add tests:
|
||||
|
||||
* Jump to middle of instruction → verifier error.
|
||||
* Jump outside function → verifier error.
|
||||
* Valid jump → passes.
|
||||
|
||||
### Junie instructions
|
||||
|
||||
**You MAY:**
|
||||
|
||||
* Reuse layout utilities for boundary checks.
|
||||
* Add verifier error cases.
|
||||
|
||||
**You MUST NOT:**
|
||||
|
||||
* Modify instruction encoding.
|
||||
* Introduce new trap codes.
|
||||
|
||||
**If unclear:**
|
||||
|
||||
* Ask before defining jump rules.
|
||||
|
||||
---
|
||||
|
||||
# PR-4.4 — Function Boundary and Terminator Verification
|
||||
|
||||
### Briefing
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user