From 968b7d4ea0073e469d6bec16518dedd024bb22b3 Mon Sep 17 00:00:00 2001 From: jia xiang <58927968+Jiax-cn@users.noreply.github.com> Date: Wed, 26 Feb 2025 12:57:46 +0800 Subject: [PATCH] fix: add dispose of the debug information builder when destroying compilation context (#4105) Co-authored-by: xiangjia.xj --- core/iwasm/compilation/aot_llvm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/iwasm/compilation/aot_llvm.c b/core/iwasm/compilation/aot_llvm.c index 14ee4dd2b..a3ac5113c 100644 --- a/core/iwasm/compilation/aot_llvm.c +++ b/core/iwasm/compilation/aot_llvm.c @@ -3334,6 +3334,11 @@ aot_destroy_comp_context(AOTCompContext *comp_ctx) if (comp_ctx->builder) LLVMDisposeBuilder(comp_ctx->builder); +#if WASM_ENABLE_DEBUG_AOT != 0 + if (comp_ctx->debug_builder) + LLVMDisposeDIBuilder(comp_ctx->debug_builder); +#endif + if (comp_ctx->orc_thread_safe_context) LLVMOrcDisposeThreadSafeContext(comp_ctx->orc_thread_safe_context);