01mf02 / jaq

A jq clone focussed on correctness, speed, and simplicity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overflow stack on recursive assignment

itchyny opened this issue · comments

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 '[[]] | .. = .[]'
[]