If i give range an invalid input, it produces a seemingly infinite sequence of numbers as output, until i terminate it (saw this in an embedded usecase too, where it ended up with the process being killed for OOM) eg:
echo '{"a": 1}' | jaq 'range(.)'
produces a sequence starting from 0 and never terminating. Also replicated with an empty object {}, empty array [], and array with data as inputs.
the jq tool produces an error. echo '{"a": 1}' | jq 'range(.)' results in jq: error (at <stdin>:1): Range bounds must be numeric
This is with jaq 2.3.0, compiled from source via cargo install --locked jaq. Rustc version 1.89, ubuntu linux 22.04, x86_64