Fix ASAN error
This code was trying to access memory before unpoisoning it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4283fb42bc
commit
e377eb0e75
2
gc.c
2
gc.c
@ -2630,8 +2630,8 @@ internal_object_p(VALUE obj)
|
|||||||
{
|
{
|
||||||
RVALUE *p = (RVALUE *)obj;
|
RVALUE *p = (RVALUE *)obj;
|
||||||
void *ptr = __asan_region_is_poisoned(p, SIZEOF_VALUE);
|
void *ptr = __asan_region_is_poisoned(p, SIZEOF_VALUE);
|
||||||
bool used_p = p->as.basic.flags;
|
|
||||||
unpoison_object(obj, false);
|
unpoison_object(obj, false);
|
||||||
|
bool used_p = p->as.basic.flags;
|
||||||
|
|
||||||
if (used_p) {
|
if (used_p) {
|
||||||
switch (BUILTIN_TYPE(p)) {
|
switch (BUILTIN_TYPE(p)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user