Project

General

Profile

Actions

Bug #14420

closed

[BUG] Unnormalized Fixnum value on Rational#hash.to_s

Added by Eregon (Benoit Daloze) almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 2.4.3p205 (2017-12-14 revision 61247) [x64-mingw32]
[ruby-core:85224]

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

Actions #3

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0