From b7a26c2ff2f140de20a50043765faee16ce0802a Mon Sep 17 00:00:00 2001 From: victoryang00 Date: Fri, 19 Jul 2024 14:05:46 +0800 Subject: [PATCH] fix staging error --- .github/workflows/codeql_buildscript.sh | 277 ------------------ .github/workflows/codeql_fail_on_error.py | 34 --- README.md | 1 - core/iwasm/aot/aot_runtime.c | 30 +- core/iwasm/common/wasm_exec_env.c | 4 + core/iwasm/common/wasm_exec_env.h | 3 +- core/iwasm/common/wasm_runtime_common.c | 1 + core/iwasm/compilation/aot_compiler.c | 10 +- core/iwasm/compilation/aot_emit_function.c | 15 +- core/iwasm/compilation/aot_emit_function.h | 5 +- core/iwasm/include/aot_comp_option.h | 14 +- core/iwasm/interpreter/wasm_interp_classic.c | 1 - .../libraries/ckpt-restore/ckpt_restore.h | 11 +- core/iwasm/libraries/ckpt-restore/wamr.cpp | 30 +- core/iwasm/libraries/ckpt-restore/wamr.h | 11 +- .../ckpt-restore/wamr_branch_block.cpp | 11 +- .../ckpt-restore/wamr_branch_block.h | 11 +- .../libraries/ckpt-restore/wamr_exec_env.cpp | 38 ++- .../libraries/ckpt-restore/wamr_exec_env.h | 11 +- .../libraries/ckpt-restore/wamr_export.cpp | 11 +- .../ckpt-restore/wamr_interp_frame.cpp | 22 +- .../ckpt-restore/wamr_interp_frame.h | 11 +- .../ckpt-restore/wamr_memory_instance.cpp | 11 +- .../ckpt-restore/wamr_memory_instance.h | 11 +- .../ckpt-restore/wamr_module_instance.cpp | 11 +- .../ckpt-restore/wamr_module_instance.h | 11 +- .../ckpt-restore/wamr_module_instance_extra.h | 11 +- .../libraries/ckpt-restore/wamr_mvvm.cpp | 11 +- .../libraries/ckpt-restore/wamr_read_write.h | 15 +- .../libraries/ckpt-restore/wamr_serializer.h | 13 +- core/iwasm/libraries/ckpt-restore/wamr_type.h | 11 +- .../ckpt-restore/wamr_wasi_arguments.cpp | 12 +- .../ckpt-restore/wamr_wasi_arguments.h | 11 +- 33 files changed, 91 insertions(+), 599 deletions(-) delete mode 100755 .github/workflows/codeql_buildscript.sh delete mode 100755 .github/workflows/codeql_fail_on_error.py diff --git a/.github/workflows/codeql_buildscript.sh b/.github/workflows/codeql_buildscript.sh deleted file mode 100755 index ed717734ea..0000000000 --- a/.github/workflows/codeql_buildscript.sh +++ /dev/null @@ -1,277 +0,0 @@ -#!/usr/bin/env bash - -sudo apt update - -sudo apt install -y build-essential cmake g++-multilib libgcc-11-dev lib32gcc-11-dev ccache ninja-build ccache - -WAMR_DIR=${PWD} - -# TODO: use pre-built llvm binary to build wamrc to -# avoid static code analysing for llvm -: ' -# build wamrc -cd ${WAMR_DIR}/wamr-compiler -./build_llvm.sh -rm -fr build && mkdir build && cd build -cmake .. -make -j -if [[ $? != 0 ]]; then - echo "Failed to build wamrc!" - exit 1; -fi -' - -# build iwasm with default features enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -fr build && mkdir build && cd build -cmake .. -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with default features enabled!" - exit 1; -fi - -# build iwasm with default features enabled on x86_32 -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -fr build && mkdir build && cd build -cmake .. -DWAMR_BUILD_TARGET=X86_32 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with default features enabled on x86_32!" - exit 1; -fi - -# build iwasm with classic interpreter enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_FAST_INTERP=0 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with classic interpreter enabled!" - exit 1; -fi - -# build iwasm with extra features enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -fr build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug \ - -DWAMR_BUILD_LIB_PTHREAD=1 -DWAMR_BUILD_LIB_PTHREAD_SEMAPHORE=1 \ - -DWAMR_BUILD_MULTI_MODULE=1 -DWAMR_BUILD_SIMD=1 \ - -DWAMR_BUILD_TAIL_CALL=1 -DWAMR_BUILD_REF_TYPES=1 \ - -DWAMR_BUILD_CUSTOM_NAME_SECTION=1 -DWAMR_BUILD_MEMORY_PROFILING=1 \ - -DWAMR_BUILD_PERF_PROFILING=1 -DWAMR_BUILD_DUMP_CALL_STACK=1 \ - -DWAMR_BUILD_LOAD_CUSTOM_SECTION=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build wamrc iwasm with extra features enabled!" - exit 1; -fi - -# build iwasm with global heap pool enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -fr build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug \ - -DWAMR_BUILD_ALLOC_WITH_USER_DATA=1 \ - -DWAMR_DISABLE_STACK_HW_BOUND_CHECK=1 \ - -DWAMR_BUILD_GLOBAL_HEAP_POOL=1 \ - -DWAMR_BUILD_GLOBAL_HEAP_SIZE=131072 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with global heap pool enabled!" - exit 1; -fi - -# build iwasm with wasi-threads enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -fr build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_LIB_WASI_THREADS=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with wasi-threads enabled!" - exit 1; -fi - -# build iwasm with GC enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_GC=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with GC enabled!" - exit 1; -fi - -# build iwasm with exception handling enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_EXCE_HANDLING=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with exception handling enabled!" - exit 1; -fi - -# build iwasm with memory64 enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_MEMORY64=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with memory64 enabled!" - exit 1; -fi - -# build iwasm with hardware boundary check disabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_DISABLE_HW_BOUND_CHECK=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with hardware boundary check disabled!" - exit 1; -fi - -# build iwasm with quick AOT entry disabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_QUICK_AOT_ENTRY=0 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with quick AOT entry disabled!" - exit 1; -fi - -# build iwasm with wakeup of blocking operations disabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_DISABLE_WAKEUP_BLOCKING_OP=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with wakeup of blocking operations disabled!" - exit 1; -fi - -# build iwasm with module instance context disabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_MODULE_INST_CONTEXT=0 \ - -DWAMR_BUILD_LIBC_BUILTIN=0 -DWAMR_BUILD_LIBC_WASI=0 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with module instance context disabled!" - exit 1; -fi - -# build iwasm with libc-uvwasi enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -fr build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_LIBC_UVWASI=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with libc-uvwasi enabled!" - exit 1; -fi - -# build iwasm with fast jit lazy mode enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_FAST_JIT_DUMP=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with fast jit lazy mode enabled!" - exit 1; -fi - -# build iwasm with fast jit eager mode enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_FAST_JIT_DUMP=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with fast jit eager mode enabled!" - exit 1; -fi - -# TODO: use pre-built llvm binary to build llvm-jit and multi-tier-jit -: ' -# build iwasm with llvm jit lazy mode enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_JIT=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build llvm jit lazy mode enabled!" - exit 1; -fi - -# build iwasm with llvm jit eager mode enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_JIT=1 -DWAMR_BUILD_LAZY_JIT=0 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build llvm jit eager mode enabled!" - exit 1; -fi - -# build iwasm with multi-tier jit enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=1 \ - -DWAMR_BUILD_FAST_JIT_DUMP=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with multi-tier jit enabled!" - exit 1; -fi -' - -# build iwasm with wasm mini-loader enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_MINI_LOADER=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build with wasm mini-loader enabled!" - exit 1; -fi - -# build iwasm with source debugging enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_DEBUG_INTERP=1 -DWAMR_BUILD_DEBUG_AOT=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with source debugging enabled!" - exit 1; -fi - -# build iwasm with AOT static PGO enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_STATIC_PGO=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with AOT static PGO enabled!" - exit 1; -fi - -# build iwasm with configurable bounds checks enabled -cd ${WAMR_DIR}/product-mini/platforms/linux -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_CONFIGUABLE_BOUNDS_CHECKS=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with configurable bounds checks enabled!" - exit 1; -fi - -# build iwasm with linux perf support enabled -cd ${WAMR_DIR}/product-mini/platforms/linux/ -rm -rf build && mkdir build && cd build -cmake .. -DCMAKE_BUILD_TYPE=Debug -DWAMR_BUILD_LINUX_PERF=1 -make -j -if [[ $? != 0 ]]; then - echo "Failed to build iwasm with linux perf support enabled!" - exit 1; -fi diff --git a/.github/workflows/codeql_fail_on_error.py b/.github/workflows/codeql_fail_on_error.py deleted file mode 100755 index 29791742b2..0000000000 --- a/.github/workflows/codeql_fail_on_error.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python3 - -import json -import sys - -# Return whether SARIF file contains error-level results -def codeql_sarif_contain_error(filename): - with open(filename, 'r') as f: - s = json.load(f) - - for run in s.get('runs', []): - rules_metadata = run['tool']['driver']['rules'] - if not rules_metadata: - rules_metadata = run['tool']['extensions'][0]['rules'] - - for res in run.get('results', []): - if 'ruleIndex' in res: - rule_index = res['ruleIndex'] - elif 'rule' in res and 'index' in res['rule']: - rule_index = res['rule']['index'] - else: - continue - try: - rule_level = rules_metadata[rule_index]['defaultConfiguration']['level'] - except IndexError as e: - print(e, rule_index, len(rules_metadata)) - else: - if rule_level == 'error': - return True - return False - -if __name__ == "__main__": - if codeql_sarif_contain_error(sys.argv[1]): - sys.exit(1) diff --git a/README.md b/README.md index 5fe9d37f15..d89d0cd17f 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,6 @@ WebAssembly Micro Runtime (WAMR) is a lightweight standalone WebAssembly (Wasm) - [Berkeley/Posix Socket support](./doc/socket_api.md), ref to [document](./doc/socket_api.md) and [sample](./samples/socket-api) - [Multi-tier JIT](./product-mini#linux) and [Running mode control](https://bytecodealliance.github.io/wamr.dev/blog/introduction-to-wamr-running-modes/) - Language bindings: [Go](./language-bindings/go/README.md), [Python](./language-bindings/python/README.md), [Rust](./language-bindings/rust/README.md) -- Language bindings: [Go](./language-bindings/go/README.md), [Python](./language-bindings/python/README.md), [Rust](./language-bindings/rust/README.md) ### Wasm post-MVP features - [wasm-c-api](https://github.com/WebAssembly/wasm-c-api), ref to [document](doc/wasm_c_api.md) and [sample](samples/wasm-c-api) diff --git a/core/iwasm/aot/aot_runtime.c b/core/iwasm/aot/aot_runtime.c index 352f039f82..d946fba224 100644 --- a/core/iwasm/aot/aot_runtime.c +++ b/core/iwasm/aot/aot_runtime.c @@ -75,11 +75,6 @@ bh_static_assert(offsetof(AOTFrame, sp) == sizeof(uintptr_t) * 5); bh_static_assert(offsetof(AOTFrame, frame_ref) == sizeof(uintptr_t) * 6); bh_static_assert(offsetof(AOTFrame, lp) == sizeof(uintptr_t) * 7); -bh_static_assert(offsetof(AOTFrame, ip_offset) == sizeof(uintptr_t) * 4); -bh_static_assert(offsetof(AOTFrame, sp) == sizeof(uintptr_t) * 5); -bh_static_assert(offsetof(AOTFrame, frame_ref) == sizeof(uintptr_t) * 6); -bh_static_assert(offsetof(AOTFrame, lp) == sizeof(uintptr_t) * 7); - static void set_error_buf(char *error_buf, uint32 error_buf_size, const char *string) { @@ -818,7 +813,6 @@ memory_instantiate(AOTModuleInstance *module_inst, AOTModuleInstance *parent, bh_assert(memory_idx == 0); bh_assert(parent->memory_count > memory_idx); shared_memory_instance = parent->memories[memory_idx]; - shared_memory_instance->ref_count++; shared_memory_inc_reference(shared_memory_instance); return shared_memory_instance; } @@ -1052,16 +1046,6 @@ memories_instantiate(AOTModuleInstance *module_inst, AOTModuleInstance *parent, return true; } -#if WASM_ENABLE_SHARED_MEMORY != 0 - /* Currently we have only one memory instance */ - bool is_shared_memory = - module->memories[0].memory_flags & 0x02 ? true : false; - if (is_shared_memory && parent != NULL) { - /* Ignore setting memory init data if the memory has been initialized */ - return true; - } -#endif - for (i = 0; i < module->mem_init_data_count; i++) { data_seg = module->mem_init_data_list[i]; #if WASM_ENABLE_BULK_MEMORY != 0 @@ -1904,7 +1888,6 @@ destroy_c_api_frames(Vector *frames) void aot_deinstantiate(AOTModuleInstance *module_inst, bool is_sub_inst) { -#if WASM_ENABLE_CHECKPOINT_RESTORE == 0 WASMModuleInstanceExtraCommon *common = &((AOTModuleInstanceExtra *)module_inst->e)->common; if (module_inst->exec_env_singleton) { @@ -1978,7 +1961,6 @@ aot_deinstantiate(AOTModuleInstance *module_inst, bool is_sub_inst) #endif wasm_runtime_free(module_inst); -#endif } AOTFunctionInstance * @@ -2263,7 +2245,6 @@ aot_call_function(WASMExecEnv *exec_env, AOTFunctionInstance *function, while (exec_env->cur_frame != prev_frame) aot_free_frame(exec_env); #endif - // checkpoint if (!ret) { if (argv1 != argv1_buf) wasm_runtime_free(argv1); @@ -2564,9 +2545,6 @@ aot_module_malloc_internal(AOTModuleInstance *module_inst, /* TODO: Memory64 size check based on memory idx type */ bh_assert(size <= UINT32_MAX); - /* TODO: Memory64 size check based on memory idx type */ - bh_assert(size <= UINT32_MAX); - if (!memory_inst) { aot_set_exception(module_inst, "uninitialized memory"); return 0; @@ -2594,7 +2572,7 @@ aot_module_malloc_internal(AOTModuleInstance *module_inst, if (!malloc_func || !execute_malloc_function(module_inst, exec_env, malloc_func, - retain_func, (uint32)size, &offset)) { + retain_func, size, &offset)) { return 0; } addr = offset ? (uint8 *)memory_inst->memory_data + offset : NULL; @@ -2705,8 +2683,7 @@ aot_module_free_internal(AOTModuleInstance *module_inst, WASMExecEnv *exec_env, free_func = aot_lookup_function(module_inst, "__unpin"); if (free_func) - execute_free_function(module_inst, exec_env, free_func, - (uint32)ptr); + execute_free_function(module_inst, exec_env, free_func, ptr); } } } @@ -2889,8 +2866,6 @@ aot_call_indirect(WASMExecEnv *exec_env, uint32 tbl_idx, uint32 table_elem_idx, while (rcc->prev_frame) { rcc = rcc->prev_frame; } - LOG_DEBUG("func_idx: %d instead of %d of thread %ld\n", rcc->func_index, - func_idx, exec_env->handle); func_idx = rcc->func_index; } #endif @@ -3754,6 +3729,7 @@ aot_free_frame_internal(WASMExecEnv *exec_env) if (prev_frame) prev_frame->func_perf_prof_info->children_exec_time += time_elapsed; #endif + wasm_exec_env_free_wasm_frame(exec_env, cur_frame); exec_env->cur_frame = (struct WASMInterpFrame *)prev_frame; } diff --git a/core/iwasm/common/wasm_exec_env.c b/core/iwasm/common/wasm_exec_env.c index 411277cacb..3a2eb7e2b7 100644 --- a/core/iwasm/common/wasm_exec_env.c +++ b/core/iwasm/common/wasm_exec_env.c @@ -72,7 +72,9 @@ wasm_exec_env_create_internal(struct WASMModuleInstanceCommon *module_inst, exec_env->wasm_stack.top_boundary = exec_env->wasm_stack.bottom + stack_size; exec_env->wasm_stack.top = exec_env->wasm_stack.bottom; +#if WASM_ENABLE_CHECKPOINT_RESTORE != 0 exec_env->is_checkpoint = false; +#endif #if WASM_ENABLE_AOT != 0 if (module_inst->module_type == Wasm_Module_AoT) { @@ -86,10 +88,12 @@ wasm_exec_env_create_internal(struct WASMModuleInstanceCommon *module_inst, wasm_runtime_dump_exec_env_mem_consumption(exec_env); #endif +#if WASM_ENABLE_CHECKPOINT_RESTORE != 0 exec_env->is_checkpoint = false; exec_env->is_restore = false; exec_env->call_chain_size = 0; exec_env->restore_call_chain = NULL; +#endif return exec_env; #ifdef OS_ENABLE_HW_BOUND_CHECK diff --git a/core/iwasm/common/wasm_exec_env.h b/core/iwasm/common/wasm_exec_env.h index 11bbf77d23..2b5955bc52 100644 --- a/core/iwasm/common/wasm_exec_env.h +++ b/core/iwasm/common/wasm_exec_env.h @@ -155,13 +155,14 @@ typedef struct WASMExecEnv { /* The WASM stack size */ uint32 wasm_stack_size; +#if WASM_ENABLE_CHECKPOINT_RESTORE != 0 /* Whether is checkpoint */ bool is_checkpoint; /* Whether is restore */ bool is_restore; size_t call_chain_size; struct AOTFrame **restore_call_chain; - +#endif /* The WASM stack of current thread */ union { uint64 __make_it_8_byte_aligned_; diff --git a/core/iwasm/common/wasm_runtime_common.c b/core/iwasm/common/wasm_runtime_common.c index d380ebe545..85136919d2 100644 --- a/core/iwasm/common/wasm_runtime_common.c +++ b/core/iwasm/common/wasm_runtime_common.c @@ -42,6 +42,7 @@ #endif #include "../common/wasm_c_api_internal.h" #include "../../version.h" + /** * For runtime build, BH_MALLOC/BH_FREE should be defined as * wasm_runtime_malloc/wasm_runtime_free. diff --git a/core/iwasm/compilation/aot_compiler.c b/core/iwasm/compilation/aot_compiler.c index 013e1279ad..6999db6e1e 100644 --- a/core/iwasm/compilation/aot_compiler.c +++ b/core/iwasm/compilation/aot_compiler.c @@ -1750,8 +1750,7 @@ aot_compile_func(AOTCompContext *comp_ctx, uint32 func_index) aot_gen_checkpoint(comp_ctx, func_ctx, frame_ip_org); } - if (!aot_compile_op_call(comp_ctx, func_ctx, func_idx, false, - frame_ip_org)) + if (!aot_compile_op_call(comp_ctx, func_ctx, func_idx, false)) return false; break; } @@ -1779,7 +1778,7 @@ aot_compile_func(AOTCompContext *comp_ctx, uint32 func_index) } if (!aot_compile_op_call_indirect(comp_ctx, func_ctx, type_idx, - tbl_idx, frame_ip_org)) + tbl_idx)) return false; break; } @@ -1793,8 +1792,7 @@ aot_compile_func(AOTCompContext *comp_ctx, uint32 func_index) } read_leb_uint32(frame_ip, frame_ip_end, func_idx); - if (!aot_compile_op_call(comp_ctx, func_ctx, func_idx, false, - frame_ip)) + if (!aot_compile_op_call(comp_ctx, func_ctx, func_idx, false)) return false; if (!aot_compile_op_return(comp_ctx, func_ctx, &frame_ip)) return false; @@ -1821,7 +1819,7 @@ aot_compile_func(AOTCompContext *comp_ctx, uint32 func_index) } if (!aot_compile_op_call_indirect(comp_ctx, func_ctx, type_idx, - tbl_idx, frame_ip_org)) + tbl_idx)) return false; if (!aot_compile_op_return(comp_ctx, func_ctx, &frame_ip)) return false; diff --git a/core/iwasm/compilation/aot_emit_function.c b/core/iwasm/compilation/aot_emit_function.c index 2356bc39c9..fe6a84b2c0 100644 --- a/core/iwasm/compilation/aot_emit_function.c +++ b/core/iwasm/compilation/aot_emit_function.c @@ -1353,7 +1353,7 @@ commit_params_to_frame_of_import_func(AOTCompContext *comp_ctx, bool aot_compile_op_call(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx, - uint32 func_idx, bool tail_call, const uint8 *frame_ip) + uint32 func_idx, bool tail_call) { uint32 import_func_count = comp_ctx->comp_data->import_func_count; AOTImportFunc *import_funcs = comp_ctx->comp_data->import_funcs; @@ -2006,8 +2006,7 @@ call_aot_call_indirect_func(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx, bool aot_compile_op_call_indirect(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx, - uint32 type_idx, uint32 tbl_idx, - const uint8 *frame_ip) + uint32 type_idx, uint32 tbl_idx) { AOTFuncType *func_type; LLVMValueRef tbl_idx_value, elem_idx, func_idx; @@ -2082,16 +2081,6 @@ aot_compile_op_call_indirect(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx, func_param_count = func_type->param_count; func_result_count = func_type->result_count; - // if (comp_ctx->aot_frame) { - // if (!aot_gen_commit_values(comp_ctx->aot_frame)) - // return false; - // if (!aot_gen_commit_sp_ip( - // comp_ctx->aot_frame, - // comp_ctx->aot_frame->sp - func_type->param_cell_num, - // frame_ip)) - // return false; - // } - POP_I32(elem_idx); /* get the cur size of the table instance */ diff --git a/core/iwasm/compilation/aot_emit_function.h b/core/iwasm/compilation/aot_emit_function.h index 697dc39515..45f7bbe596 100644 --- a/core/iwasm/compilation/aot_emit_function.h +++ b/core/iwasm/compilation/aot_emit_function.h @@ -14,12 +14,11 @@ extern "C" { bool aot_compile_op_call(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx, - uint32 func_idx, bool tail_call, const uint8 *frame_ip); + uint32 func_idx, bool tail_call); bool aot_compile_op_call_indirect(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx, - uint32 type_idx, uint32 tbl_idx, - const uint8 *frame_ip); + uint32 type_idx, uint32 tbl_idx); bool aot_compile_op_ref_null(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx); diff --git a/core/iwasm/include/aot_comp_option.h b/core/iwasm/include/aot_comp_option.h index fdfa432d6e..c8844a5848 100644 --- a/core/iwasm/include/aot_comp_option.h +++ b/core/iwasm/include/aot_comp_option.h @@ -42,14 +42,14 @@ typedef struct AOTCompOption { bool enable_stack_estimation; bool quick_invoke_c_api_import; char *use_prof_file; - uint32 opt_level; - uint32 size_level; - uint32 output_format; - uint32 bounds_checks; - uint32 stack_bounds_checks; - uint32 segue_flags; + uint32_t opt_level; + uint32_t size_level; + uint32_t output_format; + uint32_t bounds_checks; + uint32_t stack_bounds_checks; + uint32_t segue_flags; char **custom_sections; - uint32 custom_sections_count; + uint32_t custom_sections_count; const char *stack_usage_file; const char *llvm_passes; const char *builtin_intrinsics; diff --git a/core/iwasm/interpreter/wasm_interp_classic.c b/core/iwasm/interpreter/wasm_interp_classic.c index b573975eef..a115184dad 100644 --- a/core/iwasm/interpreter/wasm_interp_classic.c +++ b/core/iwasm/interpreter/wasm_interp_classic.c @@ -1504,7 +1504,6 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module, uint8 value_type; #if WASM_ENABLE_CHECKPOINT_RESTORE != 0 if (exec_env->is_restore) { - WASMFunction *cur_wasm_func = cur_func->u.func; frame = exec_env->cur_frame; UPDATE_ALL_FROM_FRAME(); frame_ip_end = wasm_get_func_code_end(cur_func); diff --git a/core/iwasm/libraries/ckpt-restore/ckpt_restore.h b/core/iwasm/libraries/ckpt-restore/ckpt_restore.h index 5f59b46976..fe232fa400 100755 --- a/core/iwasm/libraries/ckpt-restore/ckpt_restore.h +++ b/core/iwasm/libraries/ckpt-restore/ckpt_restore.h @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #include "platform_common.h" diff --git a/core/iwasm/libraries/ckpt-restore/wamr.cpp b/core/iwasm/libraries/ckpt-restore/wamr.cpp index 47f236d795..e270cefb50 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr.cpp +++ b/core/iwasm/libraries/ckpt-restore/wamr.cpp @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #include "wamr.h" @@ -50,8 +43,7 @@ class CountingSemaphore public: explicit CountingSemaphore(int count) : count_(count) - { - } + {} void acquire() { @@ -265,17 +257,12 @@ WAMRInstance::find_func(const char *name) for (int i = 0; i < target_module->function_count; i++) { auto cur_func = &target_module->functions[i]; if (cur_func->is_import_func) { - LOG_DEBUG("%s %d", cur_func->u.func_import->field_name, i); - if (!strcmp(cur_func->u.func_import->field_name, name)) { - func = ((WASMFunctionInstanceCommon *)cur_func); break; } } else { - LOG_DEBUG("%s %d", cur_func->u.func->field_name, i); - if (!strcmp(cur_func->u.func->field_name, name)) { func = ((WASMFunctionInstanceCommon *)cur_func); break; @@ -694,8 +681,6 @@ WAMRInstance::recover(std::vector> *e_) exec_env = cur_env = main_env; module_inst = main_env->module_inst; - fprintf(stderr, "invoke_init_c\n"); - fprintf(stderr, "wakeup.release\n"); wakeup.release(100); cur_env->is_restore = true; @@ -734,7 +719,6 @@ WAMRInstance::spawn_child(WASMExecEnv *cur_env, bool main) iter = ++(execEnv.begin()); parent = 0; } - // invoke_init_c(); // Each thread needs it's own thread arg auto thread_arg = ThreadArgs{ cur_env }; static std::mutex mtx; @@ -787,8 +771,6 @@ WAMRInstance::spawn_child(WASMExecEnv *cur_env, bool main) id); // tid_map } fprintf(stderr, "child spawned %p %p\n\n", cur_env, child_env); - // sleep(1); - // thread_init.acquire(); // advance ptr ++iter; parent = 0; @@ -868,8 +850,8 @@ wamr_wait(wasm_exec_env_t exec_env) } // finished restoring exec_env->is_restore = true; - fprintf(stderr, "invoke side%p\n", - ((WASMModuleInstance *)exec_env->module_inst)->global_data); + LOG_DEBUG("invoke side%p\n", + ((WASMModuleInstance *)exec_env->module_inst)->global_data); } WASMExecEnv * @@ -883,7 +865,7 @@ restore_env(WASMModuleInstanceCommon *module_inst) wamr->cur_thread = ((uint64_t)exec_env->handle); exec_env->is_restore = true; - fprintf(stderr, "restore_env: %p %p\n", exec_env, s); + LOG_DEBUG("restore_env: %p %p\n", exec_env, s); return exec_env; } diff --git a/core/iwasm/libraries/ckpt-restore/wamr.h b/core/iwasm/libraries/ckpt-restore/wamr.h index 2d2579e000..6ac68657f2 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr.h +++ b/core/iwasm/libraries/ckpt-restore/wamr.h @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #ifndef MVVM_WAMR_H diff --git a/core/iwasm/libraries/ckpt-restore/wamr_branch_block.cpp b/core/iwasm/libraries/ckpt-restore/wamr_branch_block.cpp index 2c2fc61113..c60857c2e3 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_branch_block.cpp +++ b/core/iwasm/libraries/ckpt-restore/wamr_branch_block.cpp @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #include "wamr_branch_block.h" diff --git a/core/iwasm/libraries/ckpt-restore/wamr_branch_block.h b/core/iwasm/libraries/ckpt-restore/wamr_branch_block.h index 8bde3be978..d09dbd9bbf 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_branch_block.h +++ b/core/iwasm/libraries/ckpt-restore/wamr_branch_block.h @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #ifndef MVVM_WAMR_BRANCH_BLOCK_H diff --git a/core/iwasm/libraries/ckpt-restore/wamr_exec_env.cpp b/core/iwasm/libraries/ckpt-restore/wamr_exec_env.cpp index 648158a449..08de4a5e2d 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_exec_env.cpp +++ b/core/iwasm/libraries/ckpt-restore/wamr_exec_env.cpp @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #include "wamr_exec_env.h" @@ -25,7 +18,7 @@ WAMRExecEnv::dump_impl(WASMExecEnv *env) aux_boundary = env->aux_stack_boundary; aux_bottom = env->aux_stack_bottom; auto cur_frame = env->cur_frame; - while (cur_frame) { + while (cur_frame && cur_frame->function) { auto dumped_frame = new WAMRInterpFrame(); if (wamr->is_aot) { dump(dumped_frame, (AOTFrame *)cur_frame); @@ -139,18 +132,21 @@ WAMRExecEnv::restore_impl(WASMExecEnv *env) else { cur_func = get_function_name(dump_frame->function_name); } - auto cur_wasm_func = cur_func->u.func; - all_cell_num = cur_func->param_cell_num + cur_func->local_cell_num - + cur_wasm_func->max_stack_cell_num - + cur_wasm_func->max_block_num - * (uint32)sizeof(WASMBranchBlock) / 4; - frame_size = wasm_interp_interp_frame_size(all_cell_num); - if (!(frame = ALLOC_FRAME(env, frame_size, prev_frame))) { - LOG_DEBUG("ALLOC_FRAME failed"); - exit(-1); + if (cur_func) { + auto cur_wasm_func = cur_func->u.func; + all_cell_num = cur_func->param_cell_num + + cur_func->local_cell_num + + cur_wasm_func->max_stack_cell_num + + cur_wasm_func->max_block_num + * (uint32)sizeof(WASMBranchBlock) / 4; + frame_size = wasm_interp_interp_frame_size(all_cell_num); + if (!(frame = ALLOC_FRAME(env, frame_size, prev_frame))) { + LOG_DEBUG("ALLOC_FRAME failed"); + exit(-1); + } + restore(dump_frame.get(), frame); + prev_frame = frame; } - restore(dump_frame.get(), frame); - prev_frame = frame; } env->cur_frame = prev_frame; } diff --git a/core/iwasm/libraries/ckpt-restore/wamr_exec_env.h b/core/iwasm/libraries/ckpt-restore/wamr_exec_env.h index bcc983a244..a9a3053614 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_exec_env.h +++ b/core/iwasm/libraries/ckpt-restore/wamr_exec_env.h @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #ifndef MVVM_WAMR_EXEC_ENV_H diff --git a/core/iwasm/libraries/ckpt-restore/wamr_export.cpp b/core/iwasm/libraries/ckpt-restore/wamr_export.cpp index c30f811238..c4b582b582 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_export.cpp +++ b/core/iwasm/libraries/ckpt-restore/wamr_export.cpp @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #include "wamr.h" diff --git a/core/iwasm/libraries/ckpt-restore/wamr_interp_frame.cpp b/core/iwasm/libraries/ckpt-restore/wamr_interp_frame.cpp index 9d4b8797c5..7742264b22 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_interp_frame.cpp +++ b/core/iwasm/libraries/ckpt-restore/wamr_interp_frame.cpp @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #include "wamr_interp_frame.h" @@ -47,8 +40,7 @@ void WAMRInterpFrame::restore_impl(WASMInterpFrame *env) { auto module_inst = (WASMModuleInstance *)wamr->get_exec_env()->module_inst; - if (0 < function_index - && function_index < module_inst->e->function_count) { + if (0 < function_index && function_index < module_inst->e->function_count) { // LOGV(INFO) << fmt::format("function_index {} restored", // function_index); env->function = &module_inst->e->functions[function_index]; @@ -83,7 +75,7 @@ WAMRInterpFrame::restore_impl(WASMInterpFrame *env) auto cur_func = env->function; WASMFunction *cur_wasm_func = cur_func->u.func; - LOG_DEBUG("ip_offset {} sp_offset {}, code start {}", ip, sp, + LOG_DEBUG("ip_offset %d sp_offset %d, code start %p", ip, sp, (void *)wasm_get_func_code(env->function)); env->ip = wasm_get_func_code(env->function) + ip; memcpy(env->lp, stack_frame.data(), stack_frame.size() * sizeof(uint32)); @@ -94,7 +86,7 @@ WAMRInterpFrame::restore_impl(WASMInterpFrame *env) env->sp_boundary = env->sp_bottom + cur_wasm_func->max_stack_cell_num; // print_csps(csp); - LOG_DEBUG("wasm_replay_csp_bytecode {} {} {}", (void *)wamr->get_exec_env(), + LOG_DEBUG("wasm_replay_csp_bytecode %d %d %d", (void *)wamr->get_exec_env(), (void *)env, (void *)env->ip); env->csp_bottom = (WASMBranchBlock *)env->sp_boundary; @@ -106,7 +98,7 @@ WAMRInterpFrame::restore_impl(WASMInterpFrame *env) int i = 0; for (auto &&csp_item : csp) { restore(csp_item.get(), env->csp_bottom + i); - LOG_DEBUG("csp_bottom {}", + LOG_DEBUG("csp_bottom %d", ((uint8 *)env->csp_bottom + i) - wamr->get_exec_env()->wasm_stack.bottom); i++; @@ -1008,8 +1000,6 @@ wasm_replay_csp_bytecode(WASMExecEnv *exec_env, WASMInterpFrame *frame, #if WASM_ENABLE_SHARED_MEMORY != 0 case WASM_OP_ATOMIC_PREFIX: { - LOG_DEBUG("FAULT"); - exit(-1); /* atomic_op (1 u8) + memarg (2 u32_leb) */ opcode = read_uint8(frame_ip); if (opcode != WASM_OP_ATOMIC_FENCE) { diff --git a/core/iwasm/libraries/ckpt-restore/wamr_interp_frame.h b/core/iwasm/libraries/ckpt-restore/wamr_interp_frame.h index c8f6398684..41e4cbb3bb 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_interp_frame.h +++ b/core/iwasm/libraries/ckpt-restore/wamr_interp_frame.h @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #ifndef MVVM_WAMR_INTERP_FRAME_H diff --git a/core/iwasm/libraries/ckpt-restore/wamr_memory_instance.cpp b/core/iwasm/libraries/ckpt-restore/wamr_memory_instance.cpp index bbee986dbb..6e24f37d9e 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_memory_instance.cpp +++ b/core/iwasm/libraries/ckpt-restore/wamr_memory_instance.cpp @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #include "wamr.h" diff --git a/core/iwasm/libraries/ckpt-restore/wamr_memory_instance.h b/core/iwasm/libraries/ckpt-restore/wamr_memory_instance.h index ba77b28f36..a13216bd42 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_memory_instance.h +++ b/core/iwasm/libraries/ckpt-restore/wamr_memory_instance.h @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #ifndef MVVM_WAMR_MEMORY_INSTANCE_H diff --git a/core/iwasm/libraries/ckpt-restore/wamr_module_instance.cpp b/core/iwasm/libraries/ckpt-restore/wamr_module_instance.cpp index 1e2cf50093..e928ed36bb 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_module_instance.cpp +++ b/core/iwasm/libraries/ckpt-restore/wamr_module_instance.cpp @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #include "wamr_module_instance.h" diff --git a/core/iwasm/libraries/ckpt-restore/wamr_module_instance.h b/core/iwasm/libraries/ckpt-restore/wamr_module_instance.h index 9c44a002b5..a2e2060529 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_module_instance.h +++ b/core/iwasm/libraries/ckpt-restore/wamr_module_instance.h @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #ifndef MVVM_WAMR_MODULE_INSTANCE_H diff --git a/core/iwasm/libraries/ckpt-restore/wamr_module_instance_extra.h b/core/iwasm/libraries/ckpt-restore/wamr_module_instance_extra.h index 2516e32eae..66f0541c71 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_module_instance_extra.h +++ b/core/iwasm/libraries/ckpt-restore/wamr_module_instance_extra.h @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #ifndef MVVM_WAMR_MODULE_INSTANCE_EXTRA_H diff --git a/core/iwasm/libraries/ckpt-restore/wamr_mvvm.cpp b/core/iwasm/libraries/ckpt-restore/wamr_mvvm.cpp index 0f1718509c..ef22524260 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_mvvm.cpp +++ b/core/iwasm/libraries/ckpt-restore/wamr_mvvm.cpp @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #include "wamr.h" diff --git a/core/iwasm/libraries/ckpt-restore/wamr_read_write.h b/core/iwasm/libraries/ckpt-restore/wamr_read_write.h index eabcc3c506..63dd6d13bd 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_read_write.h +++ b/core/iwasm/libraries/ckpt-restore/wamr_read_write.h @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #ifndef MVVM_WAMR_READ_WRITE_H #define MVVM_WAMR_READ_WRITE_H @@ -70,10 +63,6 @@ struct FreadStream : public ReadStream { {} ~FreadStream() override { fclose(file); } }; -// static_assert(ReaderStreamTrait, -// "Reader must conform to ReaderStreamTrait"); -// static_assert(WriterStreamTrait, -// "Writer must conform to WriterStreamTrait"); #ifndef BH_PLATFORM_WINDOWS struct SocketWriteStream : public WriteStream { int sock_fd; diff --git a/core/iwasm/libraries/ckpt-restore/wamr_serializer.h b/core/iwasm/libraries/ckpt-restore/wamr_serializer.h index 04b0a100cf..d85af1d83a 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_serializer.h +++ b/core/iwasm/libraries/ckpt-restore/wamr_serializer.h @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #ifndef MVVM_WAMR_SERIALIZER_H @@ -67,4 +60,4 @@ concept ReaderStreamTrait = requires(T &t, ReadDataType *data, std::size_t size) } -> std::same_as; }; #endif -#endif // MVVM_WAMR_SERIALIZER_H +#endif // MVVM_WAMR_SERIALIZER_H \ No newline at end of file diff --git a/core/iwasm/libraries/ckpt-restore/wamr_type.h b/core/iwasm/libraries/ckpt-restore/wamr_type.h index c7ee72009c..1b1c885e52 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_type.h +++ b/core/iwasm/libraries/ckpt-restore/wamr_type.h @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #ifndef MVVM_WAMR_TYPE_H diff --git a/core/iwasm/libraries/ckpt-restore/wamr_wasi_arguments.cpp b/core/iwasm/libraries/ckpt-restore/wamr_wasi_arguments.cpp index ac41fc2e0f..1450b57e44 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_wasi_arguments.cpp +++ b/core/iwasm/libraries/ckpt-restore/wamr_wasi_arguments.cpp @@ -1,18 +1,10 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #include "wamr_wasi_arguments.h" #include "wamr.h" -#include #include extern WAMRInstance *wamr; diff --git a/core/iwasm/libraries/ckpt-restore/wamr_wasi_arguments.h b/core/iwasm/libraries/ckpt-restore/wamr_wasi_arguments.h index 196c102b82..8c25def116 100644 --- a/core/iwasm/libraries/ckpt-restore/wamr_wasi_arguments.h +++ b/core/iwasm/libraries/ckpt-restore/wamr_wasi_arguments.h @@ -1,13 +1,6 @@ /* - * The WebAssembly Live Migration Project - * - * By: Aibo Hu - * Yiwei Yang - * Brian Zhao - * Andrew Quinn - * - * Copyright 2024 Regents of the Univeristy of California - * UC Santa Cruz Sluglab. + * Regents of the Univeristy of California, All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ #ifndef MVVM_WAMR_WASI_CONTEXT_H