ruby-changes:11452
From: shyouhei <ko1@a...>
Date: Fri, 27 Mar 2009 19:21:17 +0900 (JST)
Subject: [ruby-changes:11452] Ruby:r23077 (ruby_1_8_6): merge revision(s) 22882,22961,22971:
shyouhei 2009-03-27 19:21:06 +0900 (Fri, 27 Mar 2009) New Revision: 23077 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23077 Log: merge revision(s) 22882,22961,22971: * gc.c (run_final): calls free function. [ruby-core:22578] * gc.c (rb_gc_call_finalizer_at_exit): leave Thread objects unfinalized. [ruby-dev:38168] * gc.c (run_final): frees zombies only. [ruby-dev:38171] Modified files: branches/ruby_1_8_6/ChangeLog branches/ruby_1_8_6/gc.c branches/ruby_1_8_6/version.h Index: ruby_1_8_6/ChangeLog =================================================================== --- ruby_1_8_6/ChangeLog (revision 23076) +++ ruby_1_8_6/ChangeLog (revision 23077) @@ -1,3 +1,16 @@ +Fri Mar 27 19:12:40 2009 Nobuyoshi Nakada <nobu@r...> + + * gc.c (run_final): frees zombies only. [ruby-dev:38171] + +Fri Mar 27 19:12:40 2009 Nobuyoshi Nakada <nobu@r...> + + * gc.c (rb_gc_call_finalizer_at_exit): leave Thread objects + unfinalized. [ruby-dev:38168] + +Fri Mar 27 19:12:40 2009 Nobuyoshi Nakada <nobu@r...> + + * gc.c (run_final): calls free function. [ruby-core:22578] + Mon Mar 23 19:00:59 2009 Nobuyoshi Nakada <nobu@r...> * ext/thread/thread.c (rb_queue_pop, rb_queue_push): should not lock Index: ruby_1_8_6/version.h =================================================================== --- ruby_1_8_6/version.h (revision 23076) +++ ruby_1_8_6/version.h (revision 23077) @@ -1,15 +1,15 @@ #define RUBY_VERSION "1.8.6" -#define RUBY_RELEASE_DATE "2009-03-23" +#define RUBY_RELEASE_DATE "2009-03-27" #define RUBY_VERSION_CODE 186 -#define RUBY_RELEASE_CODE 20090323 -#define RUBY_PATCHLEVEL 365 +#define RUBY_RELEASE_CODE 20090327 +#define RUBY_PATCHLEVEL 366 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 6 #define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_MONTH 3 -#define RUBY_RELEASE_DAY 23 +#define RUBY_RELEASE_DAY 27 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; Index: ruby_1_8_6/gc.c =================================================================== --- ruby_1_8_6/gc.c (revision 23076) +++ ruby_1_8_6/gc.c (revision 23077) @@ -1898,6 +1898,9 @@ objid = rb_obj_id(obj); /* make obj into id */ rb_thread_critical = Qtrue; + if (BUILTIN_TYPE(obj) == T_DEFERRED && RDATA(obj)->dfree) { + (*RDATA(obj)->dfree)(DATA_PTR(obj)); + } args[1] = 0; args[2] = (VALUE)ruby_safe_level; for (i=0; i<RARRAY(finalizers)->len; i++) { @@ -1966,7 +1969,8 @@ p = heaps[i].slot; pend = p + heaps[i].limit; while (p < pend) { if (BUILTIN_TYPE(p) == T_DATA && - DATA_PTR(p) && RANY(p)->as.data.dfree) { + DATA_PTR(p) && RANY(p)->as.data.dfree && + RANY(p)->as.basic.klass != rb_cThread) { p->as.free.flags = 0; if ((long)RANY(p)->as.data.dfree == -1) { RUBY_CRITICAL(free(DATA_PTR(p))); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/