Fix bh_assert for 64-bit platforms (#2071)
In some cases, the memory address of some variables may have 4 least significant bytes set to zero. Because we cast the pointer to int, we look only at 4 least significant bytes; the assertion may fail because 4 least significant bytes are 0. Change bh_assert implementation to cast the assert expr to int64_t and it works well with 64-bit architectures.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
#include "bh_assert.h"
|
||||
|
||||
void
|
||||
bh_assert_internal(int v, const char *file_name, int line_number,
|
||||
bh_assert_internal(int64 v, const char *file_name, int line_number,
|
||||
const char *expr_string)
|
||||
{
|
||||
if (v)
|
||||
|
||||
Reference in New Issue
Block a user