This commit is contained in:
bQUARKz 2026-02-19 12:46:50 +00:00
parent 7ba1d71b69
commit de3ccabd62
Signed by: bquarkz
SSH Key Fingerprint: SHA256:Z7dgqoglWwoK6j6u4QC87OveEq74WOhFN+gitsxtkf8

View File

@ -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