summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-09 17:24:53 +0000
committerwyhaines <wyhaines@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-09 17:24:53 +0000
commitbc50de4bd586e8ca7475c1d2e0172569e44e4f86 (patch)
treedbb34d02f9774cbce1b8796d4e1806551b12f7a7 /gc.c
parente57a10903cf20fdfcd099cb24bf3db894532926a (diff)
Stopgap fix for gc.c based segmentation faults.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@24004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c3
1 files changed, 2 insertions, 1 deletions
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;