aot debug: Fix a few NULL dereferences on errors (#3273)

This commit is contained in:
YAMAMOTO Takashi
2024-04-02 15:30:08 +09:00
committed by GitHub
parent 250829c0cc
commit 6b0b5de1c5
3 changed files with 11 additions and 3 deletions

View File

@ -374,7 +374,9 @@ handle_next_reachable_block(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
goto fail;
}
#if WASM_ENABLE_DEBUG_AOT != 0
LLVMInstructionSetDebugLoc(ret, return_location);
if (return_location != NULL) {
LLVMInstructionSetDebugLoc(ret, return_location);
}
#endif
}
else {
@ -383,7 +385,9 @@ handle_next_reachable_block(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
goto fail;
}
#if WASM_ENABLE_DEBUG_AOT != 0
LLVMInstructionSetDebugLoc(ret, return_location);
if (return_location != NULL) {
LLVMInstructionSetDebugLoc(ret, return_location);
}
#endif
}
}