scryer-prolog icon indicating copy to clipboard operation
scryer-prolog copied to clipboard

Stack Overflow when calling read_term/3 on a huge file

Open iTitus opened this issue 2 months ago • 0 comments

> scryer-prolog rune.pl
?- rune.

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
[1]    43190 IOT instruction (core dumped)  scryer-prolog rune.pl

rune.pl:

rune :-
    open('<250 MB file which contains a single prolog term>', read, Stream),
    read_term(Stream, _Term, []),
    close(Stream).

iTitus avatar Jun 04 '24 14:06 iTitus