1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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/trunk@9821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2006-01-10 10:50:17 +00:00
parent 53cc7ba570
commit 11afa4f4d0
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,11 @@
Tue Jan 10 19:42:33 2006 Tanaka Akira <akr@m17n.org>
* 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.
Tue Jan 10 13:30:34 2006 akira yamada <akira@ruby-lang.org>
* ext/syck/rubyext.c (syck_resolver_transfer): should be able to load

2
gc.c
View file

@ -1313,6 +1313,8 @@ garbage_collect(void)
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);