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

@@ -242,8 +242,10 @@ pub struct Executor {
in_csname: bool,
command_trace_mode: Option<&'static str>,
events: ExecutionEvents,
// Set before operations that inspect earlier events beyond their count.
// The PDF space probe inspects the actual paint of earlier pages.
reads_event_history: bool,
// Capacity recounts and tracing use the resource accounting traversal.
accounts_event_history: bool,
steps: usize,
ligature_carry: super::ligature::Carry,
current: Span,
@@ -538,6 +540,7 @@ impl Executor {
command_trace_mode: None,
events: ExecutionEvents::default(),
reads_event_history: false,
accounts_event_history: false,
steps: 0,
ligature_carry: super::ligature::Carry::default(),
current: Span::default(),
@@ -3534,6 +3537,7 @@ impl Executor {
events: self.events.into_vec(),
steps: self.steps,
reads_event_history: self.reads_event_history,
accounts_event_history: self.accounts_event_history,
})
}
fn check_input_character(&self, code: i32) -> Result<(), Error> {
@@ -4037,6 +4041,7 @@ impl Executor {
incoming_state,
steps: self.steps,
reads_event_history: self.reads_event_history,
accounts_event_history: self.accounts_event_history,
})
}
fn run_observed<F: SourceProvider>(