* gc.c: don't call after_gc_sweep() after when garbage_collect()

was called, because rb_sweep_method_entry() free live unlinked
  method entries. [ruby-core:31169]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nari 2010-07-20 06:14:40 +00:00
parent a52dd6cc5c
commit 81cc3b2655
2 changed files with 15 additions and 8 deletions

View File

@ -1,3 +1,9 @@
Tue Jul 20 14:21:38 2010 Narihiro Nakamura <authorNari@gmail.com>
* gc.c: don't call after_gc_sweep() after when garbage_collect()
was called, because rb_sweep_method_entry() free live unlinked
method entries. [ruby-core:31169]
Tue Jul 20 12:42:06 2010 URABE Shyouhei <shyouhei@ruby-lang.org> Tue Jul 20 12:42:06 2010 URABE Shyouhei <shyouhei@ruby-lang.org>
* ext/socket/raddrinfo.c (rb_getaddrinfo): according to my * ext/socket/raddrinfo.c (rb_getaddrinfo): according to my

3
gc.c
View File

@ -2055,6 +2055,7 @@ gc_lazy_sweep(rb_objspace_t *objspace)
GC_PROF_TIMER_START; GC_PROF_TIMER_START;
GC_PROF_SWEEP_TIMER_START; GC_PROF_SWEEP_TIMER_START;
if (objspace->heap.sweep_slots) {
res = lazy_sweep(objspace); res = lazy_sweep(objspace);
if (res) { if (res) {
GC_PROF_SWEEP_TIMER_STOP; GC_PROF_SWEEP_TIMER_STOP;
@ -2062,8 +2063,8 @@ gc_lazy_sweep(rb_objspace_t *objspace)
GC_PROF_TIMER_STOP(Qfalse); GC_PROF_TIMER_STOP(Qfalse);
return res; return res;
} }
after_gc_sweep(objspace); after_gc_sweep(objspace);
}
gc_marks(objspace); gc_marks(objspace);