kevinlawler / kona

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

Another crash with likely illegal syntax #614

Closed gitonthescene closed 2 years ago

gitonthescene commented 2 years ago

This also crashes the second time, making it seem like it's leaving the interpreter in a bad state.

kona      \ for help. \\ to exit.

  ($:)/1234
()
  ($:)/1234
[1]    62632 segmentation fault  ./k
tavmem commented 2 years ago

In k2.8:

K 2.8 2000-10-10 Copyright (C) 1993-2000 Kx Systems
\ for help. \\ to exit.

  ($:)/1234
"1234"
  ($:)/1234
"1234"

The syntax appears to perfectly legal.

tavmem commented 2 years ago

($:)/1234 began to yield a segfault in kona after the 3rd commit made on Oct 20, 2015 945ef59af718cfe34c70e05a5477094403630992 This commit was made to address an apparent bug in k2.8 which was fixed by k3.2. See issue #380.

In k2.8, when executing the "over/monad" case f:{(x+1)!3}; f/2, k2.8 loops endlessly until you hit Ctl-c. In k3.2, f:{(x+1)!3}; f/2 yields 1

Before the 3rd commit of Oct 20,2015 945ef59af718cfe34c70e05a5477094403630992 kona also looped endlessly. After the commit, kona yields 1. However, this commit created the segfault condition on ($:)/1234