1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Check writebarrier arguments

This commit is contained in:
Nobuyoshi Nakada 2022-10-21 00:43:08 +09:00
parent be9bc48015
commit 575ae50d16
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

4
gc.c
View file

@ -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)) {