Skip to content

Commit

Permalink
Account for absorption inconsistencies when checking GC consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
rm155 committed Mar 29, 2024
1 parent b50d87e commit 8741847
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -9959,13 +9959,17 @@ check_generation_i(const VALUE child, void *ptr)

if (RGENGC_CHECK_MODE) GC_ASSERT(RVALUE_OLD_P(parent));

if (!RVALUE_OLD_P(child)) {
if (!RVALUE_REMEMBERED(parent) &&
!RVALUE_REMEMBERED(child) &&
!RVALUE_UNCOLLECTIBLE(child)) {
fprintf(stderr, "verify_internal_consistency_reachable_i: WB miss (O->Y) %s -> %s\n", obj_info(parent), obj_info(child));
data->err_count++;
}
rb_objspace_t *objspace = &rb_objspace;
bool absorption_correction_needed = objspace->rgengc.need_major_gc & GPR_FLAG_MAJOR_BY_ABSORB;
if (!absorption_correction_needed) {
if (!RVALUE_OLD_P(child)) {
if (!RVALUE_REMEMBERED(parent) &&
!RVALUE_REMEMBERED(child) &&
!RVALUE_UNCOLLECTIBLE(child)) {
fprintf(stderr, "verify_internal_consistency_reachable_i: WB miss (O->Y) %s -> %s\n", obj_info(parent), obj_info(child));
data->err_count++;
}
}
}
}

Expand Down

0 comments on commit 8741847

Please sign in to comment.