Skip to content
Permalink
Browse files

* 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_8@35619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
nobu committed May 11, 2012
1 parent fa9f734 commit 8acdd955f98cf6515da37f54b9f8003f224f9cb2
Showing with 11 additions and 5 deletions.
  1. +6 −0 ChangeLog
  2. +1 −1 ext/bigdecimal/bigdecimal.c
  3. +4 −4 version.h
@@ -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.

Sat Apr 14 18:00:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>

* bignum.c (rb_big2str0): prevent working clone from
@@ -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);}

@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.8"
#define RUBY_RELEASE_DATE "2012-04-14"
#define RUBY_RELEASE_DATE "2012-05-11"
#define RUBY_VERSION_CODE 188
#define RUBY_RELEASE_CODE 20120414
#define RUBY_RELEASE_CODE 20120511
#define RUBY_PATCHLEVEL -1

#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 8
#define RUBY_RELEASE_YEAR 2012
#define RUBY_RELEASE_MONTH 4
#define RUBY_RELEASE_DAY 14
#define RUBY_RELEASE_MONTH 5
#define RUBY_RELEASE_DAY 11

#define NO_STRING_LITERAL_CONCATENATION 1
#ifdef RUBY_EXTERN

0 comments on commit 8acdd95

Please sign in to comment.
You can’t perform that action at this time.