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
@ -295,7 +295,7 @@ enum
|
|||||||
#define ADDR_CHECK(_check, _val) ({ \
|
#define ADDR_CHECK(_check, _val) ({ \
|
||||||
char *_object = (_val).value; \
|
char *_object = (_val).value; \
|
||||||
if (!_object) JIT.throw(E_NULL); \
|
if (!_object) JIT.throw(E_NULL); \
|
||||||
if (((void (*)())_check)(_object)) JIT.throw(E_IOBJECT); \
|
if (((int (*)())_check)(_object)) JIT.throw(E_IOBJECT); \
|
||||||
_object; \
|
_object; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -904,7 +904,7 @@ static void push_unknown(int index)
|
|||||||
if (_unsafe)
|
if (_unsafe)
|
||||||
get_addr = STR_print("ADDR_UNSAFE(%s)", expr);
|
get_addr = STR_print("ADDR_UNSAFE(%s)", expr);
|
||||||
else if (class->must_check)
|
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
|
else
|
||||||
get_addr = STR_print("ADDR(%s)", expr);
|
get_addr = STR_print("ADDR(%s)", expr);
|
||||||
|
|
||||||
@ -1028,7 +1028,7 @@ static void pop_unknown(int index)
|
|||||||
if (_unsafe)
|
if (_unsafe)
|
||||||
get_addr = STR_print("ADDR_UNSAFE(%s)", expr);
|
get_addr = STR_print("ADDR_UNSAFE(%s)", expr);
|
||||||
else if (class->must_check)
|
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
|
else
|
||||||
get_addr = STR_print("ADDR(%s)", expr);
|
get_addr = STR_print("ADDR(%s)", expr);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user