leaking constraints
UWN opened this issue · comments
UWN commented
In SICStus:
| ?- call_residue_vars(X in 1..2,Vs).
Vs = [X,_A,_B,_C,_D,_E,_F],
clpz:(X in 1..2) ? ;
no
| ?- [user].
% compiling user...
| l :- X in 1..2, X = 1, l.
|
% compiled user in module user, 4 msec 2752 bytes
yes
| ?- catch(l,error(E,_),true).
E = resource_error(memory), unexpected.
$ ulimit -v
500000
Markus Triska commented
I have installed a change to address this, could you please try it and post the results? Thank you a lot!
UWN commented
Perfect! SICStus now loops happily for l/0
!
Markus Triska commented
I think the original case shows a GC issue in SICStus Prolog: After X = 1
, the attributes on X
are no longer reachable, and so should be GCed.
UWN commented
What means reachable to you? If it is reachable via call_residue_vars/2
, then it is reachable.