mthom / scryer-prolog

A modern Prolog implementation written mostly in Rust.
BSD 3-Clause "New" or "Revised" License
1.93k stars 116 forks source link

Stack Overflow when calling read_term/3 on a huge file #2415

Open iTitus opened 4 weeks ago

iTitus commented 4 weeks ago
> 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).