Skip to content

Commit 9d661c4

Browse files
committed
fix staging error
1 parent 8bf791e commit 9d661c4

28 files changed

+98
-572
lines changed

.github/workflows/codeql_buildscript.sh

-277
This file was deleted.

.github/workflows/codeql_fail_on_error.py

-34
This file was deleted.

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ WebAssembly Micro Runtime (WAMR) is a lightweight standalone WebAssembly (Wasm)
4141
- [Berkeley/Posix Socket support](./doc/socket_api.md), ref to [document](./doc/socket_api.md) and [sample](./samples/socket-api)
4242
- [Multi-tier JIT](./product-mini#linux) and [Running mode control](https://bytecodealliance.github.io/wamr.dev/blog/introduction-to-wamr-running-modes/)
4343
- Language bindings: [Go](./language-bindings/go/README.md), [Python](./language-bindings/python/README.md), [Rust](./language-bindings/rust/README.md)
44-
- Language bindings: [Go](./language-bindings/go/README.md), [Python](./language-bindings/python/README.md), [Rust](./language-bindings/rust/README.md)
4544

4645
### Wasm post-MVP features
4746
- [wasm-c-api](https://github.com/WebAssembly/wasm-c-api), ref to [document](doc/wasm_c_api.md) and [sample](samples/wasm-c-api)

core/iwasm/aot/aot_runtime.c

+2-11
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ bh_static_assert(offsetof(AOTFrame, sp) == sizeof(uintptr_t) * 5);
7575
bh_static_assert(offsetof(AOTFrame, frame_ref) == sizeof(uintptr_t) * 6);
7676
bh_static_assert(offsetof(AOTFrame, lp) == sizeof(uintptr_t) * 7);
7777

78-
bh_static_assert(offsetof(AOTFrame, ip_offset) == sizeof(uintptr_t) * 4);
79-
bh_static_assert(offsetof(AOTFrame, sp) == sizeof(uintptr_t) * 5);
80-
bh_static_assert(offsetof(AOTFrame, frame_ref) == sizeof(uintptr_t) * 6);
81-
bh_static_assert(offsetof(AOTFrame, lp) == sizeof(uintptr_t) * 7);
82-
8378
static void
8479
set_error_buf(char *error_buf, uint32 error_buf_size, const char *string)
8580
{
@@ -1056,7 +1051,7 @@ memories_instantiate(AOTModuleInstance *module_inst, AOTModuleInstance *parent,
10561051
#if WASM_ENABLE_SHARED_MEMORY != 0
10571052
/* Currently we have only one memory instance */
10581053
bool is_shared_memory =
1059-
module->memories[0].memory_flags & 0x02 ? true : false;
1054+
module->memories[0].memory_flags & SHARED_MEMORY_FLAG ? true : false;
10601055
if (is_shared_memory && parent != NULL) {
10611056
/* Ignore setting memory init data if the memory has been initialized */
10621057
return true;
@@ -3680,7 +3675,7 @@ aot_alloc_frame(WASMExecEnv *exec_env, uint32 func_index)
36803675
exec_env, exec_env->restore_call_chain, exec_env->handle);
36813676
if (((AOTFrame *)exec_env->cur_frame)->func_index != func_index) {
36823677
LOG_DEBUG("NOT MATCH!!!\n");
3683-
exit(1);
3678+
bh_assert(((AOTFrame *)exec_env->cur_frame)->func_index == func_index);
36843679
}
36853680
return true;
36863681
}
@@ -3717,10 +3712,6 @@ aot_alloc_frame(WASMExecEnv *exec_env, uint32 func_index)
37173712
frame->func_perf_prof_info = func_perf_prof;
37183713
#endif
37193714
frame->ip_offset = 0;
3720-
frame->sp = frame->lp + max_local_cell_num;
3721-
#if WASM_ENABLE_GC != 0
3722-
frame->frame_ref = frame->sp + max_stack_cell_num;
3723-
#endif
37243715

37253716
#if WASM_ENABLE_GC != 0
37263717
frame->sp = frame->lp + max_local_cell_num;

core/iwasm/common/wasm_exec_env.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,14 @@ typedef struct WASMExecEnv {
155155

156156
/* The WASM stack size */
157157
uint32 wasm_stack_size;
158+
#if WASM_ENABLE_CHECKPOINT_RESTORE != 0
158159
/* Whether is checkpoint */
159160
bool is_checkpoint;
160161
/* Whether is restore */
161162
bool is_restore;
162163
size_t call_chain_size;
163164
struct AOTFrame **restore_call_chain;
164-
165+
#endif
165166
/* The WASM stack of current thread */
166167
union {
167168
uint64 __make_it_8_byte_aligned_;

core/iwasm/common/wasm_runtime_common.c

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#endif
4343
#include "../common/wasm_c_api_internal.h"
4444
#include "../../version.h"
45+
4546
/**
4647
* For runtime build, BH_MALLOC/BH_FREE should be defined as
4748
* wasm_runtime_malloc/wasm_runtime_free.

0 commit comments

Comments
 (0)