Section 05: Verification
Context: This plan changes both compiler-side EH symbol wiring and runtime unwind behavior. Verification must confirm:
- Itanium codegen selects
@ori_eh_personalityeverywhere required. - Itanium AOT panic path raises Ori exceptions via
_Unwind_RaiseException. - Catch cleanup frees exception objects.
- MSVC compatibility assumptions remain explicit and non-regressing.
- No regressions in existing journey/spec behavior.
05.1 Build and Test Suite
-
cargo build -p ori_rt(2026-03-03) -
cargo build -p ori_llvm(2026-03-03) -
cargo build(2026-03-03) -
cargo build --release(2026-03-03) -
./test-all.sh— 10,779 passed, 0 failed (2026-03-03) -
./clippy-all.sh(2026-03-03) -
./fmt-all.sh(2026-03-03)
Targeted tests:
-
cargo test -p ori_llvm codegen::eh_model::tests(2026-03-03) — personality_name_itanium, jit_symbol_mappings pass -
cargo test -p ori_llvm codegen::runtime_decl::tests::jit_symbol_mappings_match_jit_allowed(2026-03-03) -
cargo test -p ori_rt— 329/329 pass, includes forced-unwind test (2026-03-03)
05.2 Symbol and Source Audit
Personality Symbol Migration (Compiler)
-
Verify no stale personality symbol in compiler/runtime source: (2026-03-03)
rg -n "rust_eh_personality" compiler/ori_llvm/src compiler/ori_rt/srcResult: 0 matches.
-
Verify expected symbol presence: (2026-03-03)
rg -n "ori_eh_personality" compiler/ori_llvm/src compiler/ori_rt/srcExpected hits confirmed: runtime declarations, EH model, JIT mapping, verifier fixture, runtime FFI bridge, test harness.
Panic Path Migration (Runtime)
-
Audit panic-any usage in
io.rs: (2026-03-03)rg -n "panic_any" compiler/ori_rt/src/io.rsResult: only in MSVC-gated
aot_raise_exceptioncompatibility path (line 297). -
Verify panic entrypoint ABI did not regress: (2026-03-03) Both
ori_panicandori_panic_cstrremainextern "C-unwind".
Runtime Symbol Presence
-
nm target/debug/libori_rt.a | rg "ori_eh_personality|ori_raise_exception"(2026-03-03) Result: bothT ori_eh_personalityandT ori_raise_exceptionpresent.
05.3 IR and Behavior Verification
LLVM IR Personality Audit
-
Dump IR for a known invoke-bearing program: (2026-03-03)
personality ptr @ori_eh_personalityConfirmed in
_ori_mainfor catch-bearing programs. -
Binary symbol check: (2026-03-03)
ori_eh_personalitypresent.rust_eh_personalityalso present (from Rust std internals) — expected and acceptable.
Journey Regression
-
Re-run code journeys with EH/ARC sensitivity: (2026-03-03)
- Journey 3 — pass
- Journey 5 — pass
- Journey 9 — pass
- Journey 10 — pass
- Journey 11 — pass
- Journey 12 — pass
-
Confirm eval and AOT results match expected outputs for each. (2026-03-03)
05.4 Memory and Exception Lifecycle
-
Run Valgrind suite: 7/7 pass, 0 errors (2026-03-03)
-
Run targeted catch lifecycle check: (2026-03-03) Valgrind on catch program: 0 errors, 0 definitely-lost blocks. Exception object (
OriException) properly freed via_Unwind_DeleteException→ori_exception_cleanup→free(). -
Run leak-check mode for catch flow: (2026-03-03) Catch program runs correctly with both success and failure paths.
-
Forced-unwind checks: (2026-03-03)
linux x86_64: both forced-unwind tests pass (catch-all skipped, cleanup entered)- Other targets: test file skipped cleanly via cfg.
-
Verify
ori_try_callscope remained SEH-oriented: (2026-03-03) All references inarc_emitter/are scoped toEhModel::Seh.
05.5 Completion Checklist
Compiler Integration
- Itanium EH model resolves to
ori_eh_personality(2026-03-03) - RT declarations + JIT mappings + verifier fixtures are in sync (2026-03-03)
- Zero
rust_eh_personalityincompiler/ori_llvm/srcandcompiler/ori_rt/src(2026-03-03)
Runtime Behavior
- Itanium AOT panic path raises via
_Unwind_RaiseException(2026-03-03) - Panic entrypoints remain
extern "C-unwind"(2026-03-03) - Caught exception objects are freed via
_Unwind_DeleteException(2026-03-03) - Any remaining
panic_anyuse is explicitly MSVC compatibility-gated (2026-03-03)
Regression and Safety
-
./test-all.sh,./clippy-all.sh,./fmt-all.shclean (2026-03-03) - Journey regression checks pass (J3, J5, J9, J10, J11, J12) (2026-03-03)
- Valgrind checks show no new errors/leaks (2026-03-03)
- Forced-unwind behavior validated on supported targets (2026-03-03)
Additional Bugs Found and Fixed During Verification
- Personality function ttype_index misinterpretation (2026-03-03):
ttype_index == 0was incorrectly treated as catch-all. Per the Itanium ABI,ttype_index > 0is a catch handler (NULL type table entry = catch-all), andttype_index == 0is cleanup only. Fixed ineh_personality.c. -
extern "C"instead ofextern "C-unwind"forori_raise_exceptionFFI (2026-03-03): Rust’sextern "C"boundary inserts an abort guard that prevents stack unwinding. Changed toextern "C-unwind"to allow_Unwind_RaiseExceptionto walk through the calling frame. - Assembly test LSDA encoding mismatch (2026-03-03): Test harness used
ttype_index = 0(wrong) for catch-all. Updated both x86_64 and aarch64 assembly to use proper LLVM encoding:ttype_index = 1pointing to a NULL type table entry.
Exit Criteria: The Itanium EH path is fully Ori-owned from IR symbol selection through raise/catch lifecycle management, MSVC compatibility boundaries are explicit and non-regressing, and the full verification matrix passes.