Expand description
Dual-engine replay: run a Program through the interpreter and the x86
recompiler and compare. Gated to linux/x86_64 (the recompiler needs the
Hyperlight host stack, so the whole javm-bench crate is gated to it).
Both engines are driven through the same javm-bench BuiltCaps →
invoke_cached path, so they receive byte-identical caps/initial-state —
any divergence is a real engine disagreement, never a setup skew.
Structs§
- Diff
- Both engines’ outcomes for one program.
Functions§
- diff
- Run
progthrough both engines (sharing oneBuiltCaps) and compare. - diff_
batch - Run a batch through
diff, returning(index, Diff)for each diverging program. One long-lived sandbox handles the whole batch — no rebuilds (those were the source of host-heap corruption; a single sandbox runs thousands of distinct programs cleanly). - diff_
image - Run a pre-built
Imagethrough both engines and compare. - image_
for - Build the
Imagefor a program: its code (body + signature epilogue) plus the appendedecalli 0terminator, entered at pc 0 with the program’s initial register seed. - image_
with_ ro - Build an
Imagefrom raw instructionwords(+ecalli 0terminator) with a pinned read-only data cap ofro_bytesmapped atro_start— for category-#3 read-only-cluster differential tests. Both engines materialize itPinnedCapRo(interp perm-RO, recompiler MatRange) and charge it per 2 MiB cluster. - image_
with_ ro_ caps - Build an
Imagefrom rawwordswith several pinned read-only data caps, each(start, bytes)— for multi-cap read-only-cluster differential tests (e.g. two distinct caps sharing one 2 MiB cluster). Each cap takes its own cnode slot, so the recompiler resolves each as a separatePinnedCapRoMatRangewith its own source PA, exactly as production does. - replay_
interp - Interpreter outcome for
prog. - replay_
recomp - Recompiler outcome for
prog. - seed_
reg - Convenience: seed register
xreg(by x-number) tovalin a slot-keyed init map. Mirrors the generator’s seeding; handy for hand-built programs.