From 575ae50d16a03ed23357ec4ea0dbf7167fc26c8c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 21 Oct 2022 00:43:08 +0900 Subject: [PATCH] Check writebarrier arguments --- gc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gc.c b/gc.c index 44b3f6a83c..e47a4adb1f 100644 --- a/gc.c +++ b/gc.c @@ -8920,8 +8920,8 @@ rb_gc_writebarrier(VALUE a, VALUE b) { rb_objspace_t *objspace = &rb_objspace; - if (RGENGC_CHECK_MODE && SPECIAL_CONST_P(a)) rb_bug("rb_gc_writebarrier: a is special const"); - if (RGENGC_CHECK_MODE && SPECIAL_CONST_P(b)) rb_bug("rb_gc_writebarrier: b is special const"); + if (SPECIAL_CONST_P(a)) rb_bug("rb_gc_writebarrier: a is special const: %"PRIxVALUE, a); + if (SPECIAL_CONST_P(b)) rb_bug("rb_gc_writebarrier: b is special const: %"PRIxVALUE, b); retry: if (!is_incremental_marking(objspace)) {