Skip to content

regression: tinygo apps crash in one wasi runtime if argc == 0? #1862

@dkegel-fastly

Description

@dkegel-fastly

Since 7b761fa,
tinygo apps crash on one wasm runtime. It seems the runtime used by my employer does not provide argv[0].
I could not reproduce the problem with wasmtime or wasmer, but the problem is quite reproducible in our environment.

I also tested on mac and linux, using execve to run a tinygo app without argv[0], but that worked without a crash;
linux actually does allow running with no argv[0], believe it or not, but that didn't cause a problem as it did with wasi.

The change to tinygo to avoid the crash in the wasi case is, well, tiny. Pull request coming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions