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

Function call crash the interpreter #19

Closed
jfcap opened this issue Jan 8, 2019 · 3 comments
Closed

Function call crash the interpreter #19

jfcap opened this issue Jan 8, 2019 · 3 comments

Comments

@jfcap
Copy link

jfcap commented Jan 8, 2019

Exploring janet, I've experimented this interpreter crash :

Janet 0.3.0-d5bab72  Copyright (C) 2017-2018 Calvin Rose
janet:0:> (os/shell "uname -a")
Linux mbi7 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 
x86_64 x86_64 x86_64 GNU/Linux
0
janet:22:> ((fn (x y &) (+ x y)) 1 2 3)
3
janet:51:> ((fn (x & y) (+ x y)) 1 2 3)
Segmentation fault (core dumped)
@honix
Copy link
Contributor

honix commented Jan 8, 2019

More concrete bug example (Janet 0.3.0-63dd6d0):

(+ 1 '(2 3))

@bakpakin
Copy link
Member

bakpakin commented Jan 8, 2019

I will take a look at this in a bit, it is probably related to the many changes in vm.c I have made. I suspect that the interpreter is not error checking correctly.

@bakpakin
Copy link
Member

bakpakin commented Jan 8, 2019

It was a simple fix, fixed in 67f26b7

@bakpakin bakpakin closed this as completed Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants