فهرست منبع

fix: add dispose of the debug information builder when destroying compilation context (#4105)

Co-authored-by: xiangjia.xj <xiangjia.xj@alibaba-inc.com>
jia xiang 10 ماه پیش
والد
کامیت
968b7d4ea0
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      core/iwasm/compilation/aot_llvm.c

+ 5 - 0
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);