Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uncaught memory overflow in ciaowasm (was Cannot distinguish error from failure") #52

Open
Jean-Luc-Picard-2021 opened this issue Jul 9, 2022 · 2 comments
Labels

Comments

@Jean-Luc-Picard-2021
Copy link

Jean-Luc-Picard-2021 commented Jul 9, 2022

There is a strange behaviour on my machine
with the new Ciao WASM Playground:

?- time2(fac(s(s(s(s(s(s(s(s(s(s(n)))))))))), _)).
% walltime 520.0 ms
yes
?- time2(fac(s(s(s(s(s(s(s(s(s(s(s(n))))))))))), _)).
no
?- fail.
no

I guess JavaScript WASM run out of memory. But
somehow the error is not noticed or ignored.
Would it be possible to show the out of memory?

P.S.: Was using this code:

add(n, X, X).
add(s(X), Y, Z) :- add(X, s(Y), Z).

mul(n, _, n).
mul(s(X), Y, Z) :- mul(X, Y, H), add(Y, H, Z).

fac(n, s(n)).
fac(s(X), Y) :- fac(X, H), mul(s(X), H, Y).
@jfmc jfmc added the bug label Jul 9, 2022
@jfmc
Copy link
Member

jfmc commented Jul 9, 2022

Thanks! This is definitely a bug.

@jfmc jfmc reopened this Jul 29, 2023
@jfmc jfmc changed the title Cannot distinguish error from failure ciaowasm (was Cannot distinguish error from failure") Jul 29, 2023
@jfmc
Copy link
Member

jfmc commented Jul 29, 2023

Looking at values reported by statistics/0 it seems that some memory overflow is not handled correctly.

@jfmc jfmc changed the title ciaowasm (was Cannot distinguish error from failure") uncaught memory overflow in ciaowasm (was Cannot distinguish error from failure") Jul 29, 2023
@jfmc jfmc reopened this May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants