Skip to content

Commit 7b750d1

Browse files
authored
Fix alignment calculation for large offsets (#4791)
Signed-off-by: zhenweijin <zhenwei.jin@intel.com>
1 parent a7fd653 commit 7b750d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/iwasm/compilation/aot_emit_memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ aot_check_memory_overflow(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
676676
*alignp = max_align;
677677
}
678678
else {
679-
unsigned int align = 1 << (shift - 1);
679+
unsigned int align = 1U << (shift - 1);
680680
if (align > max_align) {
681681
align = max_align;
682682
}

0 commit comments

Comments
 (0)