Sfoglia il codice sorgente

bump AOT_CURRENT_VERSION for extended-const (#4511)

cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/4504
YAMAMOTO Takashi 5 mesi fa
parent
commit
d298a66d38

+ 1 - 1
core/config.h

@@ -84,7 +84,7 @@
 #endif
 #endif
 
 
 #define AOT_MAGIC_NUMBER 0x746f6100
 #define AOT_MAGIC_NUMBER 0x746f6100
-#define AOT_CURRENT_VERSION 4
+#define AOT_CURRENT_VERSION 5
 
 
 #ifndef WASM_ENABLE_JIT
 #ifndef WASM_ENABLE_JIT
 #define WASM_ENABLE_JIT 0
 #define WASM_ENABLE_JIT 0

+ 1 - 1
core/iwasm/aot/aot_loader.c

@@ -4415,7 +4415,7 @@ aot_compatible_version(uint32 version)
      * refer to "AoT-compiled module compatibility among WAMR versions" in
      * refer to "AoT-compiled module compatibility among WAMR versions" in
      * ./doc/biuld_wasm_app.md
      * ./doc/biuld_wasm_app.md
      */
      */
-    return version == 4 || version == 3;
+    return version == AOT_CURRENT_VERSION;
 }
 }
 
 
 static bool
 static bool

+ 14 - 7
doc/build_wasm_app.md

@@ -386,13 +386,20 @@ However, there might be minor incompatibilities time to time.
 For productions, we recommend to use compatible versions of
 For productions, we recommend to use compatible versions of
 wamrc and the runtime.
 wamrc and the runtime.
 
 
-| WAMR version | AOT_CURRENT_VERSION | Compatible AOT version |
-| ------------ | ------------------- | ---------------------- |
-| 1.x          | 3                   | 3                      |
-| 2.0.0        | 3                   | 3                      |
-| 2.1.x        | 3                   | 3                      |
-| 2.2.0        | 3                   | 3                      |
-| next         | 4                   | 3,4                    |
+| WAMR version | AOT_CURRENT_VERSION | Compatible AOT version |                        |
+| ------------ | ------------------- | ---------------------- | ---------------------- |
+| 1.x          | 3                   | 3                      |                        |
+| 2.0.0        | 3                   | 3                      |                        |
+| 2.1.x        | 3                   | 3                      |                        |
+| 2.2.0        | 3                   | 3                      |                        |
+| 2.3.0        | 4                   | 3,4                    |                        |
+| 2.4.0        | 4                   | 3,4                    | See the following note |
+| 2.4.1        | 5                   | 5                      |                        |
+
+Note: 2.4.0 had a broken AoT versioning. See [issue 4504] for details.
+We recommend all 2.4.0 users to migrate to 2.4.1.
+
+[issue 4504]: https://github.com/bytecodealliance/wasm-micro-runtime/issues/4504
 
 
 ## AoT compilation with 3rd-party toolchains
 ## AoT compilation with 3rd-party toolchains
 
 

+ 1 - 1
test-tools/aot-analyzer/include/config.h

@@ -15,7 +15,7 @@
 #define WASM_CURRENT_VERSION 1
 #define WASM_CURRENT_VERSION 1
 
 
 #define AOT_MAGIC_NUMBER 0x746f6100
 #define AOT_MAGIC_NUMBER 0x746f6100
-#define AOT_CURRENT_VERSION 4
+#define AOT_CURRENT_VERSION 5
 
 
 /* Legal values for bin_type */
 /* Legal values for bin_type */
 #define BIN_TYPE_ELF32L 0 /* 32-bit little endian */
 #define BIN_TYPE_ELF32L 0 /* 32-bit little endian */