Merge pull request #2817 from adri326/fix-2815-run_module_predicate-backtrack

Fix backtracking on the topmost predicate triggering UB in run_module_predicate
This commit is contained in:
Mark Thom
2025-02-16 22:47:49 -08:00
committed by GitHub
3 changed files with 42 additions and 1 deletions

View File

@@ -568,7 +568,7 @@ impl Machine {
self.run_module_predicate(atom!("loader"), (atom!("consult_stream"), 2));
}
fn allocate_stub_choice_point(&mut self) {
pub(crate) fn allocate_stub_choice_point(&mut self) {
// NOTE: create a choice point to terminate the dispatch_loop
// if an exception is thrown.