mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
sync check_rvalue_consistency_force()
check_rvalue_consistency_force() uses is_pointer_to_heap() and it should be synchronized with other ractors. [Bug #17636]
This commit is contained in:
parent
100e464bee
commit
07ab172ebe
Notes:
git
2021-02-18 17:05:20 +09:00
1 changed files with 78 additions and 75 deletions
7
gc.c
7
gc.c
|
@ -1241,9 +1241,11 @@ RVALUE_FLAGS_AGE(VALUE flags)
|
|||
static int
|
||||
check_rvalue_consistency_force(const VALUE obj, int terminate)
|
||||
{
|
||||
rb_objspace_t *objspace = &rb_objspace;
|
||||
int err = 0;
|
||||
rb_objspace_t *objspace = &rb_objspace;
|
||||
|
||||
RB_VM_LOCK_ENTER_NO_BARRIER();
|
||||
{
|
||||
if (SPECIAL_CONST_P(obj)) {
|
||||
fprintf(stderr, "check_rvalue_consistency: %p is a special const.\n", (void *)obj);
|
||||
err++;
|
||||
|
@ -1329,11 +1331,12 @@ check_rvalue_consistency_force(const VALUE obj, int terminate)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
RB_VM_LOCK_LEAVE_NO_BARRIER();
|
||||
|
||||
if (err > 0 && terminate) {
|
||||
rb_bug("check_rvalue_consistency_force: there is %d errors.", err);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue