Actions
Bug #14420
closed[BUG] Unnormalized Fixnum value on Rational#hash.to_s
Description
p eval("(Rational(1, 2)).hash.to_s")
causes a crash on Windows 64-bit, for both Ruby 2.4 and trunk.
Ruby 2.3 seems fine.
Here is a failure log:
https://ci.appveyor.com/project/eregon/windows-shell
Updated by Eregon (Benoit Daloze) almost 7 years ago
FWIW this was found by ruby/spec: https://github.com/ruby/spec/commit/f30246e5e2909660377a1d7a07591b308595ddab
Updated by Eregon (Benoit Daloze) almost 7 years ago
The same seems to happen with Complex as well:
https://ci.appveyor.com/project/eregon/windows-shell/build/33
Updated by nobu (Nobuyoshi Nakada) almost 7 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r62107.
force fixable
-
complex.c (nucomp_hash): force hash values fixable.
[ruby-core:85224] [Bug #14420] -
rational.c (nurat_hash): ditto.
Updated by Eregon (Benoit Daloze) over 6 years ago
- Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN to 2.3: UNKNOWN, 2.4: REQUIRED, 2.5: REQUIRED
I believe this should be backported to 2.4 and 2.5.
Updated by naruse (Yui NARUSE) over 6 years ago
- Backport changed from 2.3: UNKNOWN, 2.4: REQUIRED, 2.5: REQUIRED to 2.3: UNKNOWN, 2.4: REQUIRED, 2.5: DONE
ruby_2_5 r62538 merged revision(s) 62107.
Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago
- Backport changed from 2.3: UNKNOWN, 2.4: REQUIRED, 2.5: DONE to 2.3: UNKNOWN, 2.4: DONE, 2.5: DONE
ruby_2_4 r62877 merged revision(s) 62107.
Actions
Like0
Like0Like0Like0Like0Like0Like0