Issue #13748 has been updated by MSP-Greg (Greg L).


Just updated to gcc 7.1.0, and built trunk `ruby 2.5.0dev (2017-07-15 trunk 59341) [x64-mingw32]` with Lars' patch, and all tests results were as expected.

Build/test logs are at Bintray - [z_logs_2017-07-15_59341.7z](https://dl.bintray.com/msp-greg/ruby_windows/:z_logs_2017-07-15_59341.7z), build files at [ruby_trunk.7z & ruby_trunk.7z.sig](https://dl.bintray.com/msp-greg/ruby_windows/).

Test result tables updated at [Ruby MinGW Test Results](https://msp-greg.github.io/file.mingw_test-all.html).  This morning's doc updates to the site ([Ruby trunk](https://msp-greg.github.io/ruby_trunk/index.html) and [Rails master](https://msp-greg.github.io/rails_master/index.html)) were generated using the build.

Lars - thanks again.  For those that don't know, Lars is the creator of RubyInstaller2 for Windows.  My build system is a little different, but both are MSYS/MinGW based.  My build system uses the runtime files he created for RI2, which allow the installation/compiling of extension gems.


----------------------------------------
Bug #13748: Fix mul overflow detection for LLP64 arch.
https://bugs.ruby-lang.org/issues/13748#change-65809

* Author: larskanis (Lars Kanis)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0dev (2017-07-15 trunk 57962) [x64-mingw32]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
FIXNUMs are expected to fit into a long type, but the test in MUL_OVERFLOW_FIXNUM_P() is about the VALUE type. Since long is smaller than VALUE on LLP64, the overflow is not detected. As an exemplary result "2**31" evaluates to "-2147483648" instead of "2147483648" on Windows when built with gcc-7.1.0.

This also results in many more test failures as described in this github issue: https://github.com/oneclick/rubyinstaller2/issues/55

gcc versions before 7.1.0 don't provide __builtin_mul_overflow_p() and ruby-2.4.x doesn't use this function, so that they don't show this broken behavior.

The attached patch fixes the issue. However I'm currently unable to run a full "make test-all" to verify whether this fixes all gcc-7.1.0 related issues.


---Files--------------------------------
0001-Fix-overflow-detection-for-LLP64-arch.patch (1010 Bytes)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>