Skip to content

NaNs are quieted on Emscripten #136197

Open
Open
@purplesyringa

Description

@purplesyringa

tests/ui/abi/numbers-arithmetic/return-float.rs currently fails under wasm32-unknown-emscripten:

---- [ui] tests/ui/abi/numbers-arithmetic/return-float.rs stdout ----

error: test run failed!
status: exit status: 101
command: cd "/home/purplesyringa/rust/build/x86_64-unknown-linux-gnu/test/ui/abi/numbers-arithmetic/return-float" && RUSTC="/home/purplesyringa/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" RUST_TEST_THREADS="8" "node" "/home/purplesyringa/rust/build/x86_64-unknown-linux-gnu/test/ui/abi/numbers-arithmetic/return-float/a.js"
stdout: none
--- stderr -------------------------------

thread 'main' panicked at /home/purplesyringa/rust/tests/ui/abi/numbers-arithmetic/return-float.rs:25:13:
assertion `left == right` failed
  left: 2144687445
 right: 2140493141
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------

This reproduces on 66d6064 on Node v23.6.0. WASI is fine, and I think it uses Node during tests too, so probably not a Node bug.

@rustbot label +A-ABI +A-floating-point +I-miscompile +O-emscripten +T-compiler +E-needs-investigation

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ABIArea: Concerning the application binary interface (ABI)A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-floating-pointArea: Floating point numbers and arithmeticC-bugCategory: This is a bug.I-miscompileIssue: Correct Rust code lowers to incorrect machine codeO-emscriptenTarget: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL!T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions