зеркало из https://github.com/github/ruby.git
Add check for finalizer in verify_internal_constency
This adds a check in GC.verify_internal_constency that FL_FINALIZE flags is set if, and only if it is in finalizer_table.
This commit is contained in:
Родитель
48f433fd40
Коммит
7b69563b36
7
gc.c
7
gc.c
|
@ -7561,6 +7561,13 @@ verify_internal_consistency_i(void *page_start, void *page_end, size_t stride,
|
|||
obj_info(obj));
|
||||
data->err_count++;
|
||||
}
|
||||
|
||||
if (!!FL_TEST(obj, FL_FINALIZE) != !!st_is_member(finalizer_table, obj)) {
|
||||
fprintf(stderr, "verify_internal_consistency_i: FL_FINALIZE %s but %s finalizer_table: %s\n",
|
||||
FL_TEST(obj, FL_FINALIZE) ? "set" : "not set", st_is_member(finalizer_table, obj) ? "in" : "not in",
|
||||
obj_info(obj));
|
||||
data->err_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (poisoned) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче