summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-11 05:09:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-11 05:09:58 +0000
commit67166228c63983d98805846edcce4897f3eb9068 (patch)
tree334519f73dbf66cfa069b41103e89d6bbdbbb092
parent64b6f2b2a14912f46c71377cb6281765072f6563 (diff)
* ext/bigdecimal/bigdecimal.c (PUSH): to prevent VALUE from GC,
must not cast it to unsigned long, which may be shorter than VALUE, and the result can be mere garbage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/bigdecimal/bigdecimal.c2
-rw-r--r--version.h2
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a195a116eb..5c64ff4353 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri May 11 14:09:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/bigdecimal/bigdecimal.c (PUSH): to prevent VALUE from GC,
+ must not cast it to unsigned long, which may be shorter than
+ VALUE, and the result can be mere garbage.
+
Fri May 11 01:04:54 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* io.c (io_unread): fix IO#pos with mode 'r' bug on Windows.
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index ea074055fc..fa6a696242 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -61,7 +61,7 @@ static ID id_eq;
/* MACRO's to guard objects from GC by keeping them in stack */
#define ENTER(n) volatile VALUE vStack[n];int iStack=0
-#define PUSH(x) vStack[iStack++] = (unsigned long)(x);
+#define PUSH(x) vStack[iStack++] = (VALUE)(x);
#define SAVE(p) PUSH(p->obj);
#define GUARD_OBJ(p,y) {p=y;SAVE(p);}
diff --git a/version.h b/version.h
index 3e96c2c2b6..3e25f284a1 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 208
+#define RUBY_PATCHLEVEL 209
#define RUBY_RELEASE_DATE "2012-05-11"
#define RUBY_RELEASE_YEAR 2012