Fix two issues to make fuzzing test quit earlier (#3471)
- Add a marco to limit the maxi allocable memory size of fuzz test to 2GB to avoid libFuzzer out-of-memory - Check global type in load_global_import and load_global_section
This commit is contained in:
@ -113,7 +113,7 @@ message([ceith]:REPO_ROOT_DIR, ${REPO_ROOT_DIR})
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
|
||||
add_definitions(-DWAMR_USE_MEM_POOL=0)
|
||||
add_definitions(-DWAMR_USE_MEM_POOL=0 -DWASM_ENABLE_FUZZ_TEST=1)
|
||||
|
||||
# Enable fuzzer
|
||||
add_compile_options(-fsanitize=fuzzer)
|
||||
|
||||
@ -113,7 +113,7 @@ message([ceith]:REPO_ROOT_DIR, ${REPO_ROOT_DIR})
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
|
||||
add_definitions(-DWAMR_USE_MEM_POOL=0)
|
||||
add_definitions(-DWAMR_USE_MEM_POOL=0 -DWASM_ENABLE_FUZZ_TEST=1)
|
||||
|
||||
# Enable fuzzer
|
||||
add_compile_options(-fsanitize=fuzzer)
|
||||
|
||||
Reference in New Issue
Block a user