diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-31 00:13:21 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-31 00:13:21 +0000 |
commit | a6cafde27804d0a935212ca8921408ebc35861a6 (patch) | |
tree | 04b6f8f2a094905e630f670e3fb68758d1c6e610 | |
parent | d71702168ca57315179441bce49402295b28240c (diff) |
merges r31805 from trunk into ruby_1_9_2.
--
* numeric.c (int_pow): make sure to assign the result of x * z.
If xz is optimized out, the value won't overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@31843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | numeric.c | 2 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Mon May 30 10:26:51 2011 NARUSE, Yui <naruse@ruby-lang.org> + + * numeric.c (int_pow): make sure to assign the result of x * z. + If xz is optimized out, the value won't overflow. + Sun May 29 15:09:05 2011 Nobuyoshi Nakada <nobu@ruby-lang.org> * numeric.c (flo_round): fix for negative value. @@ -2573,7 +2573,7 @@ int_pow(long x, unsigned long y) y >>= 1; } { - long xz = x * z; + volatile long xz = x * z; if (!POSFIXABLE(xz) || xz / x != z) { goto bignum; } @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 260 +#define RUBY_PATCHLEVEL 261 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 |