summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-21 10:02:16 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-21 10:02:16 +0900
commite72c5044cec4bb881300c3a4ade839d0882ec9db (patch)
treef7a1ab2ea79732f5db187a685625ec534485f035 /gc.c
parent39f7eddec4c55711d56f05b085992a83bf23159e (diff)
Check writebarrier arguments only when RGENGC_CHECK_MODE [ci skip]
The commit 575ae50d16a03ed23357ec4ea0dbf7167fc26c8c was for debugging the failure triggered by f55212bce939f736559709a8cd16c409772389c8, and it was fixed at the commit 39f7eddec4c55711d56f05b085992a83bf23159e.
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index e47a4adb1f..f2599adbde 100644
--- a/gc.c
+++ b/gc.c
@@ -8920,8 +8920,10 @@ rb_gc_writebarrier(VALUE a, VALUE b)
{
rb_objspace_t *objspace = &rb_objspace;
- 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);
+ if (RGENGC_CHECK_MODE) {
+ 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)) {