Re: segmentation fault writing cyclic term
Paul Eggert <[email protected]> Sat, 4 Dec 2021 08:55:53 -0800
| Newsgroups | gmane.comp.gnu.prolog.bugs |
|---|---|
| Organization | UCLA Computer Science Department |
| Message-ID | <[email protected]> |
On 12/4/21 03:21, Paulo Moura wrote: >> | ?- X = X+1, write(X). >> X = X+1, write(X). >> Segmentation fault (core dumped) >> >> >> Shouldn't write/1 be protected against cyclic terms? > Note that support for cyclic terms is not a ISO Prolog standard requirement. Quite right, this is not a standards violation. Still, gprolog already defends against cyclic terms when it outputs them: | ?- X=X+1. cannot display cyclic term for X so presumably it could defend against them in 'write' if this was considered useful (which it would be, for my students...).