Skip to content

Commit 3654688

Browse files
committed
FIXED: #1414 crash in C_CUT due to reset clause pointer from undo/1.
1 parent c825506 commit 3654688

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/pl-vmi.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6629,7 +6629,6 @@ VMH(deep_backtrack, 1, (int), (trace_action))
66296629
{ bool rc;
66306630

66316631
lTop = (LocalFrame)(BFR+1);
6632-
FR->clause = NULL;
66336632
if ( LD->mark_bar != NO_MARK_BAR )
66346633
LD->mark_bar = gTop;
66356634
SAVE_REGISTERS(QID);

tests/core/test_undo.pl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
33
Author: Jan Wielemaker
44
5-
WWW: http://www.swi-prolog.org
6-
Copyright (c) 2021, University of Amsterdam
7-
VU University Amsterdam
8-
CWI, Amsterdam
5+
WWW: https://www.swi-prolog.org
6+
Copyright (c) 2021-2025, University of Amsterdam
7+
VU University Amsterdam
8+
CWI, Amsterdam
9+
SWI-Prolog Solutions b.v.
910
All rights reserved.
1011
1112
Redistribution and use in source and binary forms, with or without
@@ -67,6 +68,8 @@
6768
x,
6869
true),
6970
\+ a(3).
71+
test(cleanup, fail) :- % issue #1414
72+
\+ \+ once((undo(true), fail)).
7073

7174
ok.
7275

0 commit comments

Comments
 (0)