Verify retained TeX accounting before reusing executed suffixes

This commit is contained in:
gloamxun committed 2026-11-29 08:23:58 +08:00
1 parent 0117449023
commit 57ce7116ad
8 files changed
+236 -15

No files matched your search

@@ -122,6 +122,11 @@ impl EntryCheckpoint {
let mut sources = completed.sources.clone();
sources[self.entry] = current.sources[self.entry].clone();
let tail = completed.events.get(old.events.len()..)?;
if completed.accounts_event_history && !current.equivalent_accounting_history(old) {
return None;
}
// The joined events are published results. Resumption always starts
// from a live checkpoint, whose original shared allocations stay intact.
let mut events = current.events.clone().into_vec();
events.extend_from_slice(tail);
Some(Execution {
@@ -145,6 +150,7 @@ impl EntryCheckpoint {
outgoing_state: completed.outgoing_state,
steps: completed.steps,
reads_event_history: false,
accounts_event_history: completed.accounts_event_history,
})
}
}
@@ -219,6 +225,7 @@ fn same_kernel_continuation(current: &Executor, prior: &Executor) -> bool {
writing,
stack_peaks,
alignment_balance,
accounts_event_history,
],
[
inputs,