From b2e3d5fe537dcad97beceec41020506431f67e92 Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 21 Jun 2009 09:15:27 +0000 Subject: merges r23693 from trunk into ruby_1_9_1. -- * gc.c (os_obj_of): invoke garbage collection before iteration, to avoid accessing half recycled object references. [ruby-dev:38613] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ gc.c | 4 +++- version.h | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f5300123b..af447f81f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jun 15 17:48:42 2009 Yukihiro Matsumoto + + * gc.c (os_obj_of): invoke garbage collection before iteration, to + avoid accessing half recycled object references. [ruby-dev:38613] + Sat Jun 13 07:06:54 2009 Nobuyoshi Nakada * vm_eval.c (rb_f_catch): updated rdoc about generalized argument, diff --git a/gc.c b/gc.c index c9e9a520d..bcdc9af0b 100644 --- a/gc.c +++ b/gc.c @@ -85,6 +85,7 @@ void *alloca (); int ruby_gc_debug_indent = 0; #undef GC_DEBUG +#define GC_DEBUG /* for GC profile */ #define GC_PROFILE_MORE_DETAIL 0 @@ -266,7 +267,7 @@ typedef struct RVALUE { struct RComplex complex; } as; #ifdef GC_DEBUG - char *file; + const char *file; int line; #endif } RVALUE; @@ -2164,6 +2165,7 @@ os_obj_of(rb_objspace_t *objspace, VALUE of) RVALUE *p, *pend; volatile VALUE v; + rb_garbage_collect(); i = 0; while (i < heaps_used) { while (0 < i && (uintptr_t)membase < (uintptr_t)heaps[i-1].membase) diff --git a/version.h b/version.h index 70bebf44c..cd53f1347 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #define RUBY_VERSION "1.9.1" #define RUBY_RELEASE_DATE "2009-05-22" -#define RUBY_PATCHLEVEL 177 +#define RUBY_PATCHLEVEL 178 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 -- cgit