diff --git a/core/iwasm/common/wasm_application.c b/core/iwasm/common/wasm_application.c index 02999584..d29d379b 100644 --- a/core/iwasm/common/wasm_application.c +++ b/core/iwasm/common/wasm_application.c @@ -312,7 +312,6 @@ execute_func(WASMModuleInstanceCommon *module_inst, const char *name, #endif int32 i, p, module_type; uint64 total_size; - const char *exception; char buf[128]; bh_assert(argc >= 0); @@ -632,9 +631,7 @@ fail: if (argv1) wasm_runtime_free(argv1); - exception = wasm_runtime_get_exception(module_inst); - bh_assert(exception); - os_printf("%s\n", exception); + bh_assert(wasm_runtime_get_exception(module_inst)); return false; } diff --git a/core/iwasm/common/wasm_native.c b/core/iwasm/common/wasm_native.c index 0a585134..c42bf7b3 100644 --- a/core/iwasm/common/wasm_native.c +++ b/core/iwasm/common/wasm_native.c @@ -542,8 +542,7 @@ void wasm_runtime_set_wasi_ctx(WASMModuleInstanceCommon *module_inst_comm, WASIContext *wasi_ctx) { - return wasm_native_set_context(module_inst_comm, g_wasi_context_key, - wasi_ctx); + wasm_native_set_context(module_inst_comm, g_wasi_context_key, wasi_ctx); } static void diff --git a/core/iwasm/fast-jit/jit_frontend.c b/core/iwasm/fast-jit/jit_frontend.c index ec68ad91..b2465724 100644 --- a/core/iwasm/fast-jit/jit_frontend.c +++ b/core/iwasm/fast-jit/jit_frontend.c @@ -2311,77 +2311,3 @@ jit_frontend_get_jitted_return_addr_offset() { return (uint32)offsetof(WASMInterpFrame, jitted_return_addr); } - -#if 0 -#if WASM_ENABLE_THREAD_MGR != 0 -bool -check_suspend_flags(JitCompContext *cc, JITFuncContext *func_ctx) -{ - LLVMValueRef terminate_addr, terminate_flags, flag, offset, res; - JitBasicBlock *terminate_check_block, non_terminate_block; - JITFuncType *jit_func_type = func_ctx->jit_func->func_type; - JitBasicBlock *terminate_block; - - /* Offset of suspend_flags */ - offset = I32_FIVE; - - if (!(terminate_addr = LLVMBuildInBoundsGEP( - cc->builder, func_ctx->exec_env, &offset, 1, "terminate_addr"))) { - jit_set_last_error("llvm build in bounds gep failed"); - return false; - } - if (!(terminate_addr = - LLVMBuildBitCast(cc->builder, terminate_addr, INT32_PTR_TYPE, - "terminate_addr_ptr"))) { - jit_set_last_error("llvm build bit cast failed"); - return false; - } - - if (!(terminate_flags = - LLVMBuildLoad(cc->builder, terminate_addr, "terminate_flags"))) { - jit_set_last_error("llvm build bit cast failed"); - return false; - } - /* Set terminate_flags memory accecc to volatile, so that the value - will always be loaded from memory rather than register */ - LLVMSetVolatile(terminate_flags, true); - - CREATE_BASIC_BLOCK(terminate_check_block, "terminate_check"); - MOVE_BASIC_BLOCK_AFTER_CURR(terminate_check_block); - - CREATE_BASIC_BLOCK(non_terminate_block, "non_terminate"); - MOVE_BASIC_BLOCK_AFTER_CURR(non_terminate_block); - - BUILD_ICMP(LLVMIntSGT, terminate_flags, I32_ZERO, res, "need_terminate"); - BUILD_COND_BR(res, terminate_check_block, non_terminate_block); - - /* Move builder to terminate check block */ - SET_BUILDER_POS(terminate_check_block); - - CREATE_BASIC_BLOCK(terminate_block, "terminate"); - MOVE_BASIC_BLOCK_AFTER_CURR(terminate_block); - - if (!(flag = LLVMBuildAnd(cc->builder, terminate_flags, I32_ONE, - "termination_flag"))) { - jit_set_last_error("llvm build AND failed"); - return false; - } - - BUILD_ICMP(LLVMIntSGT, flag, I32_ZERO, res, "need_terminate"); - BUILD_COND_BR(res, terminate_block, non_terminate_block); - - /* Move builder to terminate block */ - SET_BUILDER_POS(terminate_block); - if (!jit_build_zero_function_ret(cc, func_ctx, jit_func_type)) { - goto fail; - } - - /* Move builder to terminate block */ - SET_BUILDER_POS(non_terminate_block); - return true; - -fail: - return false; -} -#endif /* End of WASM_ENABLE_THREAD_MGR */ -#endif diff --git a/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c b/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c index 0ba91a7e..d5d181f8 100644 --- a/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c +++ b/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c @@ -3169,8 +3169,8 @@ wasi_ssp_sock_open(wasm_exec_env_t exec_env, struct fd_table *curfds, bool is_tcp = SOCKET_DGRAM == socktype ? false : true; bool is_ipv4 = INET6 == af ? false : true; int ret; - __wasi_filetype_t wasi_type; - __wasi_rights_t max_base, max_inheriting; + __wasi_filetype_t wasi_type = __WASI_FILETYPE_UNKNOWN; + __wasi_rights_t max_base = 0, max_inheriting = 0; __wasi_errno_t error; (void)poolfd; diff --git a/tests/wamr-test-suites/spec-test-script/muti_module_aot_ignore_cases.patch b/tests/wamr-test-suites/spec-test-script/multi_module_aot_ignore_cases.patch similarity index 100% rename from tests/wamr-test-suites/spec-test-script/muti_module_aot_ignore_cases.patch rename to tests/wamr-test-suites/spec-test-script/multi_module_aot_ignore_cases.patch diff --git a/tests/wamr-test-suites/test_wamr.sh b/tests/wamr-test-suites/test_wamr.sh index 81844f0e..b41fc901 100755 --- a/tests/wamr-test-suites/test_wamr.sh +++ b/tests/wamr-test-suites/test_wamr.sh @@ -386,7 +386,7 @@ function spec_test() git apply ../../spec-test-script/simd_ignore_cases.patch fi if [[ ${ENABLE_MULTI_MODULE} == 1 && $1 == 'aot' ]]; then - git apply ../../spec-test-script/muti_module_aot_ignore_cases.patch + git apply ../../spec-test-script/multi_module_aot_ignore_cases.patch fi # udpate thread cases @@ -948,4 +948,4 @@ fi echo -e "Test finish. Reports are under ${REPORT_DIR}" DEBUG set +xv pipefail echo "TEST SUCCESSFUL" -exit 0 \ No newline at end of file +exit 0