Przeglądaj źródła

Fix alignment calculation for large offsets (#4791)

Signed-off-by: zhenweijin <zhenwei.jin@intel.com>
Zhenwei Jin 2 tygodni temu
rodzic
commit
7b750d1652
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      core/iwasm/compilation/aot_emit_memory.c

+ 1 - 1
core/iwasm/compilation/aot_emit_memory.c

@@ -676,7 +676,7 @@ aot_check_memory_overflow(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
                 *alignp = max_align;
             }
             else {
-                unsigned int align = 1 << (shift - 1);
+                unsigned int align = 1U << (shift - 1);
                 if (align > max_align) {
                     align = max_align;
                 }