summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-10 10:50:17 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-10 10:50:17 +0000
commit84be7576b863a5c0e5870a5199a68e071ea669c2 (patch)
tree93d0f4c5d32e8ca8d7fb7560842303e60849a170 /gc.c
parent89a5e51fb4f0f88c6d75394a22d3292ffe0e6b1d (diff)
* gc.c (garbage_collect): mark ruby_current_node.
if an exception is raised in a finalizer called by rb_gc_call_finalizer_at_exit, ruby_set_current_source may use collected ruby_current_node and mark_source_filename may corrupt memory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index 5a2146b..65c858b 100644
--- a/gc.c
+++ b/gc.c
@@ -1331,6 +1331,8 @@ garbage_collect()
init_mark_stack();
+ gc_mark((VALUE)ruby_current_node, 0);
+
/* mark frame stack */
for (frame = ruby_frame; frame; frame = frame->prev) {
rb_gc_mark_frame(frame);