Skip to content

WasmVM: stdout duplication in os-test POSIX conformance binaries #31

@NathanFlurry

Description

@NathanFlurry

Summary

Multiple os-test POSIX conformance tests pass (exit 0) in WASM but produce doubled stdout output compared to native execution. For example, a test printing 'hello' on native produces 'hello'hello'\n' in WASM.

This appears to be a kernel/stdout-buffering issue where output gets flushed or captured twice during WASM binary execution via kernel.spawn().

Affected os-test cases

  • malloc/malloc-0
  • malloc/realloc-null-0
  • stdio/printf-c-pos-args
  • stdio/printf-f-pad-inf
  • stdio/printf-F-uppercase-pad-inf
  • stdio/printf-g-hash
  • stdio/printf-g-negative-precision
  • stdio/printf-g-negative-width

Expected behavior

WASM stdout should match native stdout exactly (single output, no duplication).

Context

Discovered via os-test POSIX conformance suite. Tracked in posix-exclusions.json as fail / implementation-gap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions