Actions
Bug #8492
closedObjectSpace.after_gc_start_hook aborts with GC.stress
Description
以下を実行すると assert(during_gc > 0) に失敗して abort します。
ruby -robjspace -e'ObjectSpace.after_gc_start_hook=proc{};GC.stress=true;{}'
gc.c:3818 の
gc_event_hook(objspace, RUBY_INTERNAL_EVENT_GC_START, 0 /* TODO: pass minor/immediate flag? */);
実行後に、during_gc が 0 になっている模様。
Updated by ko1 (Koichi Sasada) about 11 years ago
随分放置してしまってすみません。
これ、今でもなりますか? 手元ではなんか
$ ./ruby -robjspace -e'ObjectSpace.after_gc_start_hook=proc{};GC.stress=true;{}'
セグメンテーション違反です
などと出てしまう。これはこれでまずかろう、という気もしますが...。
Updated by nobu (Nobuyoshi Nakada) about 11 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r43245.
Yui, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
vm_trace.c: fix infinite hook
- thread.c (rb_threadptr_execute_interrupts): flush postponed job only
once at last. - vm_trace.c (rb_postponed_job_flush): defer calling postponed jobs
registered while flushing to get rid of infinite reentrance of
ObjectSpace.after_gc_start_hook. [ruby-dev:47400] [Bug #8492]
Updated by nagachika (Tomoyuki Chikanaga) about 11 years ago
- Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 1.9.3: DONTNEED, 2.0.0: DONTNEED
Actions
Like0
Like0Like0Like0