kevinlawler / kona

Open-source implementation of the K programming language
ISC License
1.36k stars 139 forks source link

Segfault when using explicit self-reference in script. #487

Closed ghost closed 6 years ago

ghost commented 6 years ago
cat test.k 
fac: {[n]
  :[n = 0
    1
    n * fac n-1]}

`0: $fac 5
./k test.k 
Segmentation fault (core dumped)

I tried the same as a one-liner in the K console and it worked without any issues. Also, changing the explicit fac inside the funbody to an _f made it work fine, although nothing alike was required in the REPL.