ruby-changes:12309
From: wyhaines <ko1@a...>
Date: Fri, 10 Jul 2009 02:25:06 +0900 (JST)
Subject: [ruby-changes:12309] Ruby:r24004 (ruby_1_8_6): Stopgap fix for gc.c based segmentation faults.
wyhaines 2009-07-10 02:24:53 +0900 (Fri, 10 Jul 2009) New Revision: 24004 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24004 Log: Stopgap fix for gc.c based segmentation faults. 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 24003) +++ ruby_1_8_6/ChangeLog (revision 24004) @@ -1,3 +1,7 @@ +Thu Jul 9 11:22:00 2009 Kirk Haines <khaines@r...> + + * gc.c: Add a check for DATA_PTR(obj) to run_final as a stopgap fix for debilitating segfaults. + Mon Jun 8 12:46:00 2009 Kirk Haines <khaines@r...> * lib/soap/mimemessage.rb: Fixed a typo -- conent -> content Index: ruby_1_8_6/version.h =================================================================== --- ruby_1_8_6/version.h (revision 24003) +++ ruby_1_8_6/version.h (revision 24004) @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2009-06-08" #define RUBY_VERSION_CODE 186 #define RUBY_RELEASE_CODE 20090608 -#define RUBY_PATCHLEVEL 369 +#define RUBY_PATCHLEVEL 370 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 Index: ruby_1_8_6/gc.c =================================================================== --- ruby_1_8_6/gc.c (revision 24003) +++ ruby_1_8_6/gc.c (revision 24004) @@ -1898,7 +1898,8 @@ objid = rb_obj_id(obj); /* make obj into id */ rb_thread_critical = Qtrue; - if (BUILTIN_TYPE(obj) == T_DEFERRED && RDATA(obj)->dfree) { + /* NOTE: This change below, adding DATA_PTR(obj) to the if line, is a stopgap fix for segfaults; the reason for DATA_PTR(obj) == 0 needs to be found and fixed. */ + if (BUILTIN_TYPE(obj) == T_DEFERRED && RDATA(obj)->dfree && DATA_PTR(obj)) { (*RDATA(obj)->dfree)(DATA_PTR(obj)); } args[1] = 0; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/