Fix access to objects that can be invalid.
[GB.JIT] * BUG: Fix access to objects that can be invalid.
This commit is contained in:
parent
7a129a8d83
commit
698e5dd948
2 changed files with 3 additions and 3 deletions
|
@ -295,7 +295,7 @@ enum
|
|||
#define ADDR_CHECK(_check, _val) ({ \
|
||||
char *_object = (_val).value; \
|
||||
if (!_object) JIT.throw(E_NULL); \
|
||||
if (((void (*)())_check)(_object)) JIT.throw(E_IOBJECT); \
|
||||
if (((int (*)())_check)(_object)) JIT.throw(E_IOBJECT); \
|
||||
_object; \
|
||||
})
|
||||
|
||||
|
|
|
@ -904,7 +904,7 @@ static void push_unknown(int index)
|
|||
if (_unsafe)
|
||||
get_addr = STR_print("ADDR_UNSAFE(%s)", expr);
|
||||
else if (class->must_check)
|
||||
get_addr = STR_print("ADDR_CHECK(%p, %s)", class->must_check, expr);
|
||||
get_addr = STR_print("ADDR_CHECK(%p, %s)", class->check, expr);
|
||||
else
|
||||
get_addr = STR_print("ADDR(%s)", expr);
|
||||
|
||||
|
@ -1028,7 +1028,7 @@ static void pop_unknown(int index)
|
|||
if (_unsafe)
|
||||
get_addr = STR_print("ADDR_UNSAFE(%s)", expr);
|
||||
else if (class->must_check)
|
||||
get_addr = STR_print("ADDR_CHECK(%p, %s)", class->must_check, expr);
|
||||
get_addr = STR_print("ADDR_CHECK(%p, %s)", class->check, expr);
|
||||
else
|
||||
get_addr = STR_print("ADDR(%s)", expr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue