Skip to content

Bytecode compiler panics on wrong arity for many built-ins #141

Closed

Description

@howlcipher

Motoko's arity audit in the #140 review found these crashes. All of them also reproduce on base, before #140.

Governed builds panic on: read_file (0 args), write_file (0–1), mkdir (0), env (0), task (0), res (0–2), res_json (0–1), store_open (0), defun (0–1), http_server (0), and (print (str_trim)).

Default profile only: exec, spawn_agent (0–1), llm_generate, sql_query (0–1), db_connect (0–2), lazy_synthesize (0–2), confidence.

Repro: echo '(cli_app (read_file))' > p.howl && howlframe build --profile governed p.howl -o o

Expected: a fail-closed arity error (suggested code ARITY_ERROR), no panic and no artifact, like #139.

Related gaps on the Go/JS targets: all/any, ver_gt/ver_ge and an if used as a value still print 'Built' but produce code that doesn't compile. These should be rejected with UNSUPPORTED_ON_TARGET.

Activity

  1. added a commit that references this issue on Oct 12, 2026
    be5fc0e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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