mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (force_chain_object, rb_objspace_call_finalizer): delete
finalizer entry after corresponding finalizer is executed. This caused SEGV when test/cgi is executed with GC.stress = true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
701c70e068
commit
264f490012
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
Sun May 30 00:02:39 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* gc.c (force_chain_object, rb_objspace_call_finalizer): delete
|
||||
finalizer entry after corresponding finalizer is executed.
|
||||
This caused SEGV when test/cgi is executed with GC.stress = true.
|
||||
|
||||
Sat May 29 23:30:33 2010 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* string.c (str_replace_shared): change embedded state atomically.
|
||||
|
|
3
gc.c
3
gc.c
|
@ -2840,7 +2840,7 @@ force_chain_object(st_data_t key, st_data_t val, st_data_t arg)
|
|||
curr->table = val;
|
||||
curr->next = *prev;
|
||||
*prev = curr;
|
||||
return ST_DELETE;
|
||||
return ST_CONTINUE;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2873,6 +2873,7 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace)
|
|||
while (list) {
|
||||
struct force_finalize_list *curr = list;
|
||||
run_finalizer(objspace, curr->obj, rb_obj_id(curr->obj), curr->table);
|
||||
st_delete(finalizer_table, (st_data_t*)&curr->obj, 0);
|
||||
list = curr->next;
|
||||
xfree(curr);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue