Properly handle i32.trunc_f64_s of -2147483648.x (#1225)

Fixes #1224

Add testing for other values that seem too big to be
converted, but are ok after rounding. This is the only
one that was a spec interpreter bug. I wrote those
tests in a simple way with .9 values, replacing
the .9999999 from earlier - as @binji said, we should
either use hex-float notation, or avoid testing the parser
at the same time. As the issue here is rounding, I think
it's clearest to add .9 which suggests "this should be
rounded away".
2 files changed
tree: 20169cbc9139fbb399b45ac42b81a382dab74fa8
  1. .gitattributes
  2. .gitignore
  3. .gitmodules
  4. .travis.yml
  8. deploy_key.enc
  9. document/
  10. interpreter/
  11. papers/
  12. proposals/
  13. test/
  14. w3c.json
  15. wasm-specs.bib

Build Status


This repository holds the sources for the WebAssembly draft specification (to seed a future WebAssembly Working Group), a reference implementation, and the official testsuite.

A formatted version of the spec is available here:,

Participation is welcome. Discussions about new features, significant semantic changes, or any specification change likely to generate substantial discussion should take place in the WebAssembly design repository first, so that this spec repository can remain focused. And please follow the guidelines for contributing.


For citing WebAssembly in LaTeX, use this bibtex file.