Skip to content

Running fib.bf with bf.jq overflows stack / runs out of memory #41

@01mf02

Description

@01mf02

I took fib.bf and bf.jq from https://github.com/01mf02/jaq/tree/main/examples, then ran the commands in the README:

$ JQ=jq jqjq/jqjq -n "\"$(cat jqjq/fib.bf)\" | $(cat jqjq/bf.jq)"
jq: error: cannot allocate memory
$ JQ=jaq jqjq/jqjq -n "\"$(cat jqjq/fib.bf)\" | $(cat jqjq/bf.jq)"

thread 'main' has overflowed its stack
fatal runtime error: stack overflow, aborting
$ jq --version
jq-1.8.1
$ jaq --version
jaq 2.3.0

On the other hand, hello.bf works.

$ JQ=jq jqjq/jqjq -n "\"$(cat jqjq/hello.bf)\" | $(cat jqjq/bf.jq)"
"Hello, world!"
$ JQ=jaq jqjq/jqjq -n "\"$(cat jqjq/hello.bf)\" | $(cat jqjq/bf.jq)"
"Hello, world!"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions