From d298a66d38960719e17fbe27e8f529d6515bad26 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Sun, 27 Jul 2025 15:39:35 +0900 Subject: [PATCH] bump AOT_CURRENT_VERSION for extended-const (#4511) cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/4504 --- core/config.h | 2 +- core/iwasm/aot/aot_loader.c | 2 +- doc/build_wasm_app.md | 21 ++++++++++++++------- test-tools/aot-analyzer/include/config.h | 2 +- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/core/config.h b/core/config.h index 38af3b029..3ee0b2cd9 100644 --- a/core/config.h +++ b/core/config.h @@ -84,7 +84,7 @@ #endif #define AOT_MAGIC_NUMBER 0x746f6100 -#define AOT_CURRENT_VERSION 4 +#define AOT_CURRENT_VERSION 5 #ifndef WASM_ENABLE_JIT #define WASM_ENABLE_JIT 0 diff --git a/core/iwasm/aot/aot_loader.c b/core/iwasm/aot/aot_loader.c index 1bbc03a95..771ef87ff 100644 --- a/core/iwasm/aot/aot_loader.c +++ b/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 * ./doc/biuld_wasm_app.md */ - return version == 4 || version == 3; + return version == AOT_CURRENT_VERSION; } static bool diff --git a/doc/build_wasm_app.md b/doc/build_wasm_app.md index 2cea78069..c717c98e5 100644 --- a/doc/build_wasm_app.md +++ b/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 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 diff --git a/test-tools/aot-analyzer/include/config.h b/test-tools/aot-analyzer/include/config.h index 970d7e2cc..9f7fa49ea 100644 --- a/test-tools/aot-analyzer/include/config.h +++ b/test-tools/aot-analyzer/include/config.h @@ -15,7 +15,7 @@ #define WASM_CURRENT_VERSION 1 #define AOT_MAGIC_NUMBER 0x746f6100 -#define AOT_CURRENT_VERSION 4 +#define AOT_CURRENT_VERSION 5 /* Legal values for bin_type */ #define BIN_TYPE_ELF32L 0 /* 32-bit little endian */