Closed flexoron closed 2 months ago
What an incredible catch!
Incredible because other libraries do not trigger the abort:
$ scryer-prolog -f
?- use_module(library(lists)).
true.
?- asserta(lists:test).
true.
?- assertz(lists:test).
true.
?- lists:test.
true
; true.
?-
@mthom: Thank you a lot! Why is it that we can only produce this issue with library(clpz)
? For instance, with d.pl
, everything seems to work as expected:
:- module(d, []). :- dynamic(d/0).
Yielding:
$ scryer-prolog ?- use_module(d). true. ?- asserta(d:d). true. ?- assertz(d:d). true.
It had to do with clpz's internal '$clause'/2
an extensible but non-dynamic predicate.
Maybe thats why we see this issue: #2390
$ scryer-prolog -f
?- assertz(clpz:test).
true.
?- use_module(library(clpz)).
% Warning: overwriting $clause/2 because the clauses are discontiguous
true.
?- retract(clpz:test).
error(permission_error(modify,static_procedure,test/0),retract/1).
?- halt.
$ scryer-prolog -f
?- use_module(library(clpz)).
true.
?- assertz(clpz:test).
true.
?- retract(clpz:test).
true.
?-
Aborted (core dumped) issue fixed!