Skip to content

WasmVM: namespace os-test binaries trap (no main) #42

@NathanFlurry

Description

@NathanFlurry

All 120 namespace/ os-test binaries trap with unreachable at runtime because they are compile-only header conformance checks with no main() function.

The os-test namespace tests just #include a header and assign a function pointer — they are meant to verify the header compiles, not to run. The wasi-sdk _start entry point calls main() which doesn't exist, causing the trap.

Fix: Add an empty main() stub when compiling namespace/ tests in the Makefile (e.g. -Dmain=__os_test_stub_main with a stub, or link a small int main(){return 0;} object).

120 tests affected.

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