Overflow stack on recursive assignment
itchyny opened this issue · comments
itchyny commented
I'm not sure how jaq's correctness answers to this query, but it shouldn't panic.
$ jq -nc '[[]] | .. = ..'
[[[]]]
[[]]
$ jaq -nc '[[]] | .. = ..'
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
zsh: abort jaq -nc '[[]] | .. = ..'
I also found a small discrepancy.
$ jq -nc '[[]] | .. = .[]'
[[]]
$ jaq -nc '[[]] | .. = .[]'
[]