Skip to content

Commit

Permalink
* ext/bigdecimal/bigdecimal.c (PUSH): to prevent VALUE from GC,
Browse files Browse the repository at this point in the history
	  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_2@35619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed May 11, 2012
1 parent 2867611 commit 9c3bf9b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions 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 Apr 20 12:40:19 2012 Eric Hodel <drbrain@segment7.net>

* lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem: Removed to avoid
Expand Down
2 changes: 1 addition & 1 deletion ext/bigdecimal/bigdecimal.c
Expand Up @@ -35,7 +35,7 @@ VALUE rb_cBigDecimal;

/* 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);}

Expand Down
8 changes: 4 additions & 4 deletions version.h
@@ -1,13 +1,13 @@
#define RUBY_VERSION "1.9.2"
#define RUBY_PATCHLEVEL 320
#define RUBY_PATCHLEVEL 321
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1

#define RUBY_RELEASE_YEAR 2012
#define RUBY_RELEASE_MONTH 4
#define RUBY_RELEASE_DAY 20
#define RUBY_RELEASE_DATE "2012-04-20"
#define RUBY_RELEASE_MONTH 5
#define RUBY_RELEASE_DAY 11
#define RUBY_RELEASE_DATE "2012-05-11"

#include "ruby/version.h"

Expand Down

0 comments on commit 9c3bf9b

Please sign in to comment.