Ver código fonte

Fix locel.set in polymorphic stack (#3135)

The issue was reported in #3123.
Xu Jun 2 anos atrás
pai
commit
d6d5072cc6

+ 1 - 1
core/iwasm/interpreter/wasm_loader.c

@@ -8906,7 +8906,6 @@ re_scan:
             {
                 p_org = p - 1;
                 GET_LOCAL_INDEX_TYPE_AND_OFFSET();
-                POP_TYPE(local_type);
 
 #if WASM_ENABLE_FAST_INTERP != 0
                 if (!(preserve_referenced_local(
@@ -8963,6 +8962,7 @@ re_scan:
                 }
 #endif
 #endif /* end of WASM_ENABLE_FAST_INTERP != 0 */
+                POP_TYPE(local_type);
                 break;
             }
 

+ 1 - 1
core/iwasm/interpreter/wasm_mini_loader.c

@@ -6594,7 +6594,6 @@ re_scan:
             {
                 p_org = p - 1;
                 GET_LOCAL_INDEX_TYPE_AND_OFFSET();
-                POP_TYPE(local_type);
 
 #if WASM_ENABLE_FAST_INTERP != 0
                 if (!(preserve_referenced_local(
@@ -6648,6 +6647,7 @@ re_scan:
                 }
 #endif
 #endif
+                POP_TYPE(local_type);
                 break;
             }