[ruby-trunk - Bug #10464] [Closed] Bignum同士の乗算の不具合

Issue #10464 has been updated by Akira T…

Status changed from Open to Closed
% Done changed from 0 to 100

Applied in changeset r48222.


  • bignum.c (bary_mul_balance_with_mulfunc): Fix free work area
    location.
    [ruby-dev:48723] [Bug #10464]
    [ruby-core:66044] [Bug #10465]
    Reported by Kohji Nishihama.

Bug #10464: Bignum同士の乗算の不具合

  • Author: Kohji Nishihama
  • Status: Closed
  • Priority: Normal
  • Assignee: Kohji Nishihama
  • Category:
  • Target version: next minor
  • ruby -v: ruby 2.1.4p265 (2014-10-27 revision 48166) [i386-mingw32]
  • Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN

あるBignum同士を乗算すると、誤った値が出力されます。
OSはWindows Vista Home Premium。
なお、ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-mswin32]、ruby 1.9.3p484
(2013-11-22) [i386-mingw32]、200: ruby 2.0.0p353 (2013-11-22)
[i386-mingw32]では正常に動作し、
ruby 2.1.3p242 (2014-09-19 revision 47630) [i386-mingw32]では同様に不具合が生じました。

$ ruby bug.rb
5470148495 # 誤った乗算の値
1943359375 # 真の乗算の値
#なお、冗長になるので下10桁のみを表示しています

—Files--------------------------------
bug.rb (16.9 KB)