mthom / scryer-prolog

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

nth0/3 OutOfBounds panic #2382

Closed flexoron closed 5 months ago

flexoron commented 5 months ago

$ scryer-prolog -v v0.9.4-33-g77e90ca7

$ scryer-prolog
?- nth0(1000000000000000000,"",_).
   false.
?- nth0(10000000000000000000,"",_).
thread 'main' panicked at src/machine/system_calls.rs:750:55:
called `Result::unwrap()` on an `Err` value: OutOfBounds

Crash intended?

triska commented 5 months ago

A crash can never be intended, it is always a mistake in the engine!

flexoron commented 5 months ago

Fixed! Many thanks!