mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Add debug message to assertion for checking GC mode
We assert that the GC is not in a cycle in gc_start, but it does not show what phase we're in if the assertion fails. This commit adds a debug message for when the assertion fails.
This commit is contained in:
parent
80f53eba40
commit
a4948c30fd
1 changed files with 1 additions and 1 deletions
|
@ -6322,7 +6322,7 @@ gc_start(rb_objspace_t *objspace, unsigned int reason)
|
|||
if (!rb_darray_size(objspace->heap_pages.sorted)) return TRUE; /* heap is not ready */
|
||||
if (!(reason & GPR_FLAG_METHOD) && !ready_to_gc(objspace)) return TRUE; /* GC is not allowed */
|
||||
|
||||
GC_ASSERT(gc_mode(objspace) == gc_mode_none);
|
||||
GC_ASSERT(gc_mode(objspace) == gc_mode_none, "gc_mode is %s\n", gc_mode_name(gc_mode(objspace)));
|
||||
GC_ASSERT(!is_lazy_sweeping(objspace));
|
||||
GC_ASSERT(!is_incremental_marking(objspace));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue