Skip to content

Commit c8df3f6

Browse files
authored
Fix app heap migrate issue and aot compilation warning (#368)
1 parent e113298 commit c8df3f6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/iwasm/compilation/aot_emit_const.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ aot_compile_op_f32_const(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
4545
int32 i32_const;
4646
memcpy(&i32_const, &f32_const, sizeof(int32));
4747
if (!(alloca = LLVMBuildAlloca(comp_ctx->builder,
48-
INT32_PTR_TYPE, "i32_ptr"))) {
48+
I32_TYPE, "i32_ptr"))) {
4949
aot_set_last_error("llvm build alloca failed.");
5050
return false;
5151
}

core/shared/mem-alloc/ems/ems_kfc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ gc_migrate(gc_handle_t handle, gc_handle_t handle_old)
131131
size = hmu_get_size(cur);
132132
bh_assert(size > 0);
133133

134-
if (!HMU_IS_FC_NORMAL(size)) {
134+
if (hmu_get_ut(cur) == HMU_FC && !HMU_IS_FC_NORMAL(size)) {
135135
tree_node = (hmu_tree_node_t *)cur;
136136
adjust_ptr((uint8**)&tree_node->left, offset);
137137
adjust_ptr((uint8**)&tree_node->right, offset);

0 commit comments

Comments
 (0)