Skip to content

Commit 84bae0e

Browse files
committed
disable compiler to prevent get_current_target() crash
1 parent d053f55 commit 84bae0e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

core/iwasm/common/wasm_runtime_common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,7 +1485,7 @@ wasm_runtime_load_ex(uint8 *buf, uint32 size, const LoadArgs *args,
14851485
#endif
14861486
}
14871487
else if (package_type == Wasm_Module_AoT) {
1488-
#if WASM_ENABLE_AOT != 0
1488+
#if WASM_ENABLE_AOT != 0 && WASM_ENABLE_WAMR_COMPILER == 0
14891489
module_common = (WASMModuleCommon *)aot_load_from_aot_file(
14901490
buf, size, args, error_buf, error_buf_size);
14911491
if (module_common)
@@ -7517,7 +7517,7 @@ wasm_runtime_load_depended_module(const WASMModuleCommon *parent_module,
75177517
#endif
75187518
}
75197519
else if (get_package_type(buffer, buffer_size) == Wasm_Module_AoT) {
7520-
#if WASM_ENABLE_AOT != 0
7520+
#if WASM_ENABLE_AOT != 0 && WASM_ENABLE_WAMR_COMPILER == 0
75217521
sub_module = (WASMModuleCommon *)aot_load_from_aot_file(
75227522
buffer, buffer_size, &args, error_buf, error_buf_size);
75237523
#endif

tests/fuzz/wasm-mutator-fuzz/aot-compiler/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if(NOT WAMR_BUILD_INTERP)
77
endif()
88

99
set(WAMR_BUILD_WAMR_COMPILER 1)
10-
set(WAMR_BUILD_AOT 1)
10+
set(WAMR_BUILD_AOT 0)
1111
set(WAMR_BUILD_INTERP 1)
1212
set(WAMR_BUILD_JIT 0)
1313

@@ -69,7 +69,7 @@ target_link_libraries(aotclib PUBLIC ${REQUIRED_LLVM_LIBS})
6969

7070
if(NOT IN_OSS_FUZZ)
7171
message(STATUS "Enable ASan and UBSan in non-oss-fuzz environment")
72-
target_compile_options(aotclib PUBLIC
72+
target_compile_options(aotclib PUBLIC
7373
-fprofile-instr-generate -fcoverage-mapping
7474
-fno-sanitize-recover=all
7575
-fsanitize=address,undefined

0 commit comments

Comments
 (0)