Refine codes and fix several issues (#1094)

Add aot relocation for ".rodata.str" symbol to support more cases
Fix some coding style issues
Fix aot block/value stack destroy issue
Refine classic/fast interpreter codes
Clear compile warning of libc_builtin_wrapper.c in 32-bit platform
This commit is contained in:
Wenyong Huang
2022-04-18 17:33:30 +08:00
committed by GitHub
parent 2366e8c493
commit d4758d7380
9 changed files with 40 additions and 25 deletions

View File

@ -81,9 +81,10 @@ typedef char *_va_list;
int32 n; \
\
/* additional 2 bytes: one is the format char, \
* the other is `\0` */ \
if (fmt - fmt_start_addr + 2 >= fmt_buf_len) { \
bh_assert(fmt - fmt_start_addr <= UINT32_MAX - 2); \
the other is `\0` */ \
if ((uint32)(fmt - fmt_start_addr + 2) >= fmt_buf_len) { \
bh_assert((uint32)(fmt - fmt_start_addr) <= \
UINT32_MAX - 2); \
fmt_buf_len = fmt - fmt_start_addr + 2; \
if (!(fmt_buf = wasm_runtime_malloc(fmt_buf_len))) { \
print_err(out, ctx); \