Skip to content

Commit

Permalink
Merge pull request #934 from bytecodealliance/main
Browse files Browse the repository at this point in the history
Merge bytecodealliance:main into wenyongh:main
  • Loading branch information
wenyongh authored Jul 1, 2024
2 parents c867cf8 + ea582fb commit e4d7881
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
6 changes: 5 additions & 1 deletion core/iwasm/common/wasm_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,12 @@ wasm_enlarge_memory_internal(WASMModuleInstance *module, uint32 inc_page_count)

bool
wasm_runtime_enlarge_memory(WASMModuleInstanceCommon *module_inst,
uint32_t inc_page_count)
uint64 inc_page_count)
{
if (inc_page_count > UINT32_MAX) {
return false;
}

#if WASM_ENABLE_AOT != 0
if (module_inst->module_type == Wasm_Module_AoT) {
return aot_enlarge_memory((AOTModuleInstance *)module_inst,
Expand Down
10 changes: 9 additions & 1 deletion core/iwasm/include/wasm_export.h
Original file line number Diff line number Diff line change
Expand Up @@ -1842,9 +1842,17 @@ WASM_RUNTIME_API_EXTERN bool
wasm_runtime_is_import_global_linked(const char *module_name,
const char *global_name);

/**
* Enlarge the memory region for a module instance
*
* @param module_inst the module instance
* @param inc_page_count the number of pages to add
*
* @return true if success, false otherwise
*/
WASM_RUNTIME_API_EXTERN bool
wasm_runtime_enlarge_memory(wasm_module_inst_t module_inst,
uint32_t inc_page_count);
uint64_t inc_page_count);

typedef enum {
INTERNAL_ERROR,
Expand Down
4 changes: 4 additions & 0 deletions tests/fuzz/wasm-mutator-fuzz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ project(wasm_mutator)

set (CMAKE_BUILD_TYPE Debug)

if (NOT DEFINED CMAKE_C_COMPILER)
set (CMAKE_C_COMPILER "clang")
endif ()
if (NOT DEFINED CMAKE_CXX_COMPILER)
set (CMAKE_CXX_COMPILER "clang++")
endif ()

string (TOLOWER ${CMAKE_HOST_SYSTEM_NAME} WAMR_BUILD_PLATFORM)

Expand Down

0 comments on commit e4d7881

Please sign in to comment.