Skip to content

Commit

Permalink
Fix ip (bytecode offset) not committed into the latest aot frame (byt…
Browse files Browse the repository at this point in the history
  • Loading branch information
wenyongh authored Mar 11, 2024
1 parent f550feb commit b6216a5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/iwasm/compilation/aot_emit_exception.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ aot_emit_exception(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
aot_set_last_error("llvm build phi failed.");
return false;
}

/* Commit ip to current frame */
if (!commit_ip(comp_ctx, func_ctx, func_ctx->exception_ip_phi,
is_64bit)) {
return false;
}
}

/* Call aot_set_exception_with_id() to throw exception */
Expand Down Expand Up @@ -154,12 +160,6 @@ aot_emit_exception(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
return false;
}

if (comp_ctx->aot_frame) {
if (!commit_ip(comp_ctx, func_ctx, func_ctx->exception_ip_phi,
is_64bit))
return false;
}

/* Create return IR */
AOTFuncType *aot_func_type = func_ctx->aot_func->func_type;
if (!aot_build_zero_function_ret(comp_ctx, func_ctx, aot_func_type)) {
Expand Down

0 comments on commit b6216a5

Please sign in to comment.