WebAssembly / WebAssembly/binaryen

`pass` test failures on 32-bit systems

Open
#8,366 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
1d 19h
Merged PRs (30d)
69

Description

When running

cmake -G Ninja -DCMAKE_CXX_FLAGS="-m32" -DCMAKE_C_FLAGS="-m32" -DCMAKE_BUILD_TYPE=Debug .
ninja
python3 check.py lit

I get test failures in passes/O_fast-math.wast and passes/optimize-instructions-mvp.wast. Both tests give the wrong NaN:

$ "filecheck" "/usr/local/google/home/stevenfont/code/binaryen/test/lit/passes/O_fast-math.wast"
# command output:
/usr/local/google/home/stevenfont/code/binaryen/test/lit/passes/O_fast-math.wast:41:17: error: CHECK-NEXT: expected string not found in input
 ;; CHECK-NEXT: (f32.const -nan:0x23017a)
                ^
<stdin>:19:1: note: scanning from here
  (f32.const -nan:0x63017a)
^

error: command failed with exit status: 1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the provided CMake, Ninja, and check.py commands, then inspect passes/O_fast-math.wast and passes/optimize-instructions-mvp.wast, focusing on their NaN CHECK lines. Done means both pass tests produce the expected NaN values on a 32-bit build.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, python, wasm
Domain
compilers, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.