summaryrefslogtreecommitdiff
path: root/src/support/safe_integer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix warnings from -Wheader-hygiene and -Wimplicit-const-int-float-conversion ↵Martin Kustermann2022-11-171-2/+2
| | | | | | | | | (#5273) When `-Wheader-hygiene` is enabled, C compiler will warn when using namespace directive in global context in header file. When `-Wimplicit-const-int-float-conversion` is enabled C compiler will warn on implicit integer to double conversions that change values.
* Fix i32.trunc_f64_u of values that round down to UINT32_MAX (#2976)Alon Zakai2020-07-221-2/+2
|
* Fix i32.trunc_f64_s of values that round up to INT32_MIN (#2975)Alon Zakai2020-07-221-2/+2
| | | See WebAssembly/spec#1224
* Fix i32.trunc_f64_s of values near the limit of f64 representation (#2968)Alon Zakai2020-07-211-2/+2
| | | See WebAssembly/spec#1223
* More efficient isInteger util (#2945)Max Graey2020-07-061-1/+1
|
* Apply format changes from #2048 (#2059)Alon Zakai2019-04-261-12/+16
| | | Mass change to apply clang-format to everything. We are applying this in a PR by me so the (git) blame is all mine ;) but @aheejin did all the work to get clang-format set up and all the manual work to tidy up some things to make the output nicer in #2048
* Fix Visual Studio 2015 warnings about casting from double to int32_t in ↵BSalita2016-05-121-2/+2
| | | | safe_integer.cpp (#480)
* Fix {i32,i64}.trunc_{s,u}/{f32,f64} in interpreter (#421)Ben Smith2016-05-021-0/+92
| | | | Check the binary representation of the float instead of converting it to a float first.
* Tighten safe integerJF Bastien2016-03-281-16/+18
| | | | #282 removed the assert, but the code didn't handle negative -> unsigned conversion properly, and doesn't behave well with -0.0. I'm not super comfortable with 64-bit int min / max to double conversions either, but that'll be for another patch.
* remove bogus asserts from safe_integer castsAlon Zakai2016-03-281-4/+0
|
* Safe integer: assert before converting double to integer.JF Bastien2016-01-101-0/+5
|
* Add Travis builds with sanitizersJF Bastien2016-01-101-0/+70
This triggers 5 independent build / test runs: - clang, no sanitizer; - clang, UB sanitizer; - clang, address sanitizer (disabled for now); - clang, thread sanitizer (disabled for now); - GCC. Enabling UBSan led to these changes: - Fix a bunch of undefined behavior throughout the code base. - Fix some tests that relied on that undefined behavior. - Make some of the tests easier to debug by printing their command line. - Add ubsan blacklist to work around libstdc++ bug. - Example testcase also needs sanitizer because libsupport.a uses it.