summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--gc.c3
-rw-r--r--version.h2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 50d36af3f6..590d921929 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Jul 9 11:22:00 2009 Kirk Haines <khaines@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* lib/soap/mimemessage.rb: Fixed a typo -- conent -> content
diff --git a/gc.c b/gc.c
index 318e24ca73..1ed3a38ff4 100644
--- a/gc.c
+++ b/gc.c
@@ -1898,7 +1898,8 @@ run_final(obj)
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;
diff --git a/version.h b/version.h
index 3a9af63472..39d28ce683 100644
--- a/version.h
+++ b/version.h
@@ -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