From f0712b94f769152415d08a11323fa9ef6107be10 Mon Sep 17 00:00:00 2001 From: dm4 Date: Wed, 17 Sep 2025 08:27:59 +0000 Subject: [PATCH 1/6] Use llvm19 Signed-off-by: dm4 --- wasmedge.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wasmedge.spec b/wasmedge.spec index d566576..7caf182 100644 --- a/wasmedge.spec +++ b/wasmedge.spec @@ -15,12 +15,12 @@ Source0: %{url}/releases/download/%{version}/%{reponame}-%{version}-src.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: git -BuildRequires: lld18-devel -BuildRequires: llvm18-devel +BuildRequires: lld19-devel +BuildRequires: llvm19-devel BuildRequires: ninja-build BuildRequires: spdlog-devel -Requires: lld18 -Requires: llvm18 +Requires: lld19 +Requires: llvm19 Requires: spdlog # Currently wasmedge could only be built on specific arches ExclusiveArch: x86_64 aarch64 @@ -59,11 +59,11 @@ This package contains necessary header files for %{reponame} development. [ -f VERSION ] || echo -n %{version} > VERSION %build -%cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DWASMEDGE_BUILD_TESTS=OFF -DLLVM_DIR=/usr/lib64/llvm18/lib/cmake/llvm +%cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DWASMEDGE_BUILD_TESTS=OFF -DLLVM_DIR=/usr/lib64/llvm19/lib/cmake/llvm %cmake_build mkdir rt cd rt -%cmake -S .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DWASMEDGE_BUILD_TESTS=OFF -DWASMEDGE_BUILD_AOT_RUNTIME=OFF -DLLVM_DIR=/usr/lib64/llvm18/lib/cmake/llvm +%cmake -S .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=OFF -DWASMEDGE_BUILD_TESTS=OFF -DWASMEDGE_BUILD_AOT_RUNTIME=OFF -DLLVM_DIR=/usr/lib64/llvm19/lib/cmake/llvm %cmake_build %install From f36ad84fb82cef73f3d7954a96da3261b28eb6f9 Mon Sep 17 00:00:00 2001 From: dm4 Date: Wed, 17 Sep 2025 08:41:31 +0000 Subject: [PATCH 2/6] Require lld19 when building Signed-off-by: dm4 --- wasmedge.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/wasmedge.spec b/wasmedge.spec index 7caf182..a115ad9 100644 --- a/wasmedge.spec +++ b/wasmedge.spec @@ -15,6 +15,7 @@ Source0: %{url}/releases/download/%{version}/%{reponame}-%{version}-src.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: git +BuildRequires: lld19 BuildRequires: lld19-devel BuildRequires: llvm19-devel BuildRequires: ninja-build From 20d0bb39f2ff4b764c613a69bab160fdc050d646 Mon Sep 17 00:00:00 2001 From: dm4 Date: Fri, 2 Jan 2026 07:48:31 +0000 Subject: [PATCH 3/6] Remove the unused patch file Signed-off-by: dm4 --- ...-deprecated-warning-in-ciso646-heade.patch | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 0001-LLVM-Ignore-c-17-deprecated-warning-in-ciso646-heade.patch diff --git a/0001-LLVM-Ignore-c-17-deprecated-warning-in-ciso646-heade.patch b/0001-LLVM-Ignore-c-17-deprecated-warning-in-ciso646-heade.patch deleted file mode 100644 index 14802d3..0000000 --- a/0001-LLVM-Ignore-c-17-deprecated-warning-in-ciso646-heade.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 05c0693bb02e83f342af08ed27747be3bc761668 Mon Sep 17 00:00:00 2001 -From: Shen-Ta Hsieh -Date: Tue, 21 Jan 2025 13:19:23 +0800 -Subject: [PATCH] [LLVM] Ignore c++17 deprecated warning in header - -Signed-off-by: Shen-Ta Hsieh ---- - lib/llvm/llvm.h | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/lib/llvm/llvm.h b/lib/llvm/llvm.h -index b5e19745..9b08d97b 100644 ---- a/lib/llvm/llvm.h -+++ b/lib/llvm/llvm.h -@@ -2,6 +2,13 @@ - // SPDX-FileCopyrightText: 2019-2024 Second State INC - #pragma once - -+#if defined(__GNUC__) || defined(__clang__) -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wcpp" -+#include -+#pragma GCC diagnostic pop -+#endif -+ - #include "common/errcode.h" - #include "common/span.h" - #include --- -2.34.1 - From 92a9f402d001d187a11f52e27960aab550eaac84 Mon Sep 17 00:00:00 2001 From: dm4 Date: Fri, 2 Jan 2026 07:50:30 +0000 Subject: [PATCH 4/6] Backport fix for CVE-2025-22921 Signed-off-by: dm4 --- ...ne-the-overflow-detection-when-wrapp.patch | 52 +++++++++++++++++++ wasmedge.spec | 4 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 0001-fix-runtime-refine-the-overflow-detection-when-wrapp.patch diff --git a/0001-fix-runtime-refine-the-overflow-detection-when-wrapp.patch b/0001-fix-runtime-refine-the-overflow-detection-when-wrapp.patch new file mode 100644 index 0000000..c332c3e --- /dev/null +++ b/0001-fix-runtime-refine-the-overflow-detection-when-wrapp.patch @@ -0,0 +1,52 @@ +From 37cc9fa19bd23edbbdaa9252059b17f191fa4d17 Mon Sep 17 00:00:00 2001 +From: YiYing He +Date: Wed, 17 Dec 2025 20:27:38 +0800 +Subject: [PATCH] fix(runtime): refine the overflow detection when wrapping + memory instance + +Signed-off-by: YiYing He +--- + include/runtime/instance/memory.h | 24 +++++++++++++++++++----- + 1 file changed, 19 insertions(+), 5 deletions(-) + +diff --git a/include/runtime/instance/memory.h b/include/runtime/instance/memory.h +index ce511a7b..9d849598 100644 +--- a/include/runtime/instance/memory.h ++++ b/include/runtime/instance/memory.h +@@ -241,14 +241,28 @@ public: + return reinterpret_cast(&DataPtr[Offset]); + } + +- /// Get array of object at specific offset of memory. ++ /// Get array of object with count at specific offset of memory. + template +- Span getSpan(uint32_t Offset, uint32_t Size) const noexcept { +- uint32_t ByteSize = static_cast(sizeof(T) * Size); +- if (unlikely(!checkAccessBound(Offset, ByteSize))) { ++ Span getSpan(uint32_t Offset, uint32_t Count) const noexcept { ++ uint32_t Size; ++#if defined(_MSC_VER) && !defined(__clang__) // MSVC ++ // Should extend for memory64 proposal. ++ uint64_t Num = ++ static_cast(sizeof(T)) * static_cast(Count); ++ if ((Num >> 32) != 0) { ++ return Span(); ++ } ++ Size = static_cast(Num); ++#else ++ if (unlikely(__builtin_mul_overflow(static_cast(sizeof(T)), Count, ++ &Size))) { ++ return Span(); ++ } ++#endif ++ if (unlikely(!checkAccessBound(Offset, Size))) { + return Span(); + } +- return Span(reinterpret_cast(&DataPtr[Offset]), Size); ++ return Span(reinterpret_cast(&DataPtr[Offset]), Count); + } + + /// Get array of object at specific offset of memory. +-- +2.43.0 + diff --git a/wasmedge.spec b/wasmedge.spec index a115ad9..164cb37 100644 --- a/wasmedge.spec +++ b/wasmedge.spec @@ -12,6 +12,8 @@ Summary: High performance WebAssembly Virtual Machine License: Apache-2.0 AND CC0-1.0 URL: https://github.com/%{reponame}/%{reponame} Source0: %{url}/releases/download/%{version}/%{reponame}-%{version}-src.tar.gz +# Patch from https://github.com/WasmEdge/WasmEdge/commit/37cc9fa19bd23edbbdaa9252059b17f191fa4d17 +Patch0: 0001-fix-runtime-refine-the-overflow-detection-when-wrapp.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: git @@ -56,7 +58,7 @@ Provides: %{reponame}-devel = %{version}-%{release} This package contains necessary header files for %{reponame} development. %prep -%autosetup -n %{name} +%autosetup -n %{name} -p1 [ -f VERSION ] || echo -n %{version} > VERSION %build From 98cd46b8bbce2b0221d3ded01452b16d9aa4278f Mon Sep 17 00:00:00 2001 From: hydai Date: Tue, 2 Jun 2026 06:18:59 +0000 Subject: [PATCH 5/6] Release 0.17.0 Signed-off-by: hydai --- .gitignore | 1 + ...ne-the-overflow-detection-when-wrapp.patch | 52 ------------------- sources | 15 +----- wasmedge.spec | 19 +++++-- 4 files changed, 17 insertions(+), 70 deletions(-) delete mode 100644 0001-fix-runtime-refine-the-overflow-detection-when-wrapp.patch diff --git a/.gitignore b/.gitignore index 2010a24..83680b1 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /WasmEdge-0.14.0-src.tar.gz /WasmEdge-0.14.1-src.tar.gz /WasmEdge-0.15.0-src.tar.gz +/WasmEdge-0.17.0-src.tar.gz diff --git a/0001-fix-runtime-refine-the-overflow-detection-when-wrapp.patch b/0001-fix-runtime-refine-the-overflow-detection-when-wrapp.patch deleted file mode 100644 index c332c3e..0000000 --- a/0001-fix-runtime-refine-the-overflow-detection-when-wrapp.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 37cc9fa19bd23edbbdaa9252059b17f191fa4d17 Mon Sep 17 00:00:00 2001 -From: YiYing He -Date: Wed, 17 Dec 2025 20:27:38 +0800 -Subject: [PATCH] fix(runtime): refine the overflow detection when wrapping - memory instance - -Signed-off-by: YiYing He ---- - include/runtime/instance/memory.h | 24 +++++++++++++++++++----- - 1 file changed, 19 insertions(+), 5 deletions(-) - -diff --git a/include/runtime/instance/memory.h b/include/runtime/instance/memory.h -index ce511a7b..9d849598 100644 ---- a/include/runtime/instance/memory.h -+++ b/include/runtime/instance/memory.h -@@ -241,14 +241,28 @@ public: - return reinterpret_cast(&DataPtr[Offset]); - } - -- /// Get array of object at specific offset of memory. -+ /// Get array of object with count at specific offset of memory. - template -- Span getSpan(uint32_t Offset, uint32_t Size) const noexcept { -- uint32_t ByteSize = static_cast(sizeof(T) * Size); -- if (unlikely(!checkAccessBound(Offset, ByteSize))) { -+ Span getSpan(uint32_t Offset, uint32_t Count) const noexcept { -+ uint32_t Size; -+#if defined(_MSC_VER) && !defined(__clang__) // MSVC -+ // Should extend for memory64 proposal. -+ uint64_t Num = -+ static_cast(sizeof(T)) * static_cast(Count); -+ if ((Num >> 32) != 0) { -+ return Span(); -+ } -+ Size = static_cast(Num); -+#else -+ if (unlikely(__builtin_mul_overflow(static_cast(sizeof(T)), Count, -+ &Size))) { -+ return Span(); -+ } -+#endif -+ if (unlikely(!checkAccessBound(Offset, Size))) { - return Span(); - } -- return Span(reinterpret_cast(&DataPtr[Offset]), Size); -+ return Span(reinterpret_cast(&DataPtr[Offset]), Count); - } - - /// Get array of object at specific offset of memory. --- -2.43.0 - diff --git a/sources b/sources index 87a5719..8bce1f5 100644 --- a/sources +++ b/sources @@ -1,14 +1 @@ -SHA512 (WasmEdge-0.10.1-src.tar.gz) = 56375a1198e9dd20a66e4baffd2932afbd125e652bb761bf2c4de31be7edfbdc50a6aad5f6cc9b83dc5838841e60d51e7420310d366d6fb860a0c32c97ecc3d3 -SHA512 (WasmEdge-0.11.0-src.tar.gz) = 4baadceca1f522123e1e8e1cb48657e4f39ccda6cc50731c8774bea833947bc6503b787c271498e604555ca261e01b933f27e257d7b0c94c258e371cc0171e66 -SHA512 (WasmEdge-0.11.1-src.tar.gz) = d5bf0d9b906adf0f8b6bb4bb0128b896552ce62b26f6c3ef351308f7f63c1e082acfe8c056b2013957a7a1e24959ce546c40ecb593a0a0d40df03f53e17b4570 -SHA512 (WasmEdge-0.11.2-src.tar.gz) = ebe10f564fdb142075fb39eea3b6e4e784db62d1a2bfdb84158036cb044510c20b77051f1f4279d5d220146a69dc97350da9799a57a06c6aa0b8e00d8714b685 -SHA512 (WasmEdge-0.12.0-src.tar.gz) = 23a87617a9c528f3639a6ccb51a8fce4e7ba4659591559ed7bba5350eb9270cae3adcad19e547c5699d74cbed2c55ad28ab684bbd5e759d782e431e9dd93ff8e -SHA512 (WasmEdge-0.12.1-src.tar.gz) = c81ddbe9925e8ea144381f3d999f8b19bfcfae91aa63328beeee1f3c5b002ce47157eee28d5323d3a7303806975417856d5ec497d1e60f59312f9dc47756c533 -SHA512 (WasmEdge-0.13.1-src.tar.gz) = 66739e02ffb9669b2545765bcbcf49845afa4e1b9f6d11d011363c11febb0aff4465a774dddd7b513568ff99c80490d76611b74d4d8bd510df7209a73f3abcb0 -SHA512 (WasmEdge-0.13.2-src.tar.gz) = 68038e39487fca9845da77e0ced3af5e36160a0aa458ddd0540d4dbb5d47e0e8f4e12582e9b1c57b371ba13218dcceef6bc44cbd2b76aab7626b0ada963cdba4 -SHA512 (WasmEdge-0.13.3-src.tar.gz) = b8b2e1974fd2ca5bfa0b10311812b69a2a0d2b9864c3d316e3134a08e0a08392cad2b83867e20cd7feeead2afabfa8be19079e690ded7ae9e9bdef41223fd7bd -SHA512 (WasmEdge-0.13.4-src.tar.gz) = ec9b7d1d5eddeb263e4fd00b11e0cac8e11e73a00db0a53ef01ade13518841823274d5ad85be005a82cf8c58a5bec7a8ad6e54358abe4a784439692afbe43fcf -SHA512 (WasmEdge-0.13.5-src.tar.gz) = 9d3ece45897d2c9bb3848662fc4ab36c2e0f178450b00f7ea7d183b7162d150d1306e1781b2542463993bab2ec6732def8d63be20ec192b18d93d98c537fb48a -SHA512 (WasmEdge-0.14.0-src.tar.gz) = fa9ab14f1c477e1909efe88d760a2ab9212687328a885054f0830284bc71d559ab5263eefbbc564d88280b3907d5e3145ffeff87830eb13ad1f3fc4a599e4340 -SHA512 (WasmEdge-0.14.1-src.tar.gz) = cf708ad789c8d7cb8b5885d6b13dbb010fa433e93971fedb0c05dd2794ad69d79b08535c854ea8744243ff65c61f0de1b6e3fe2a981b69fc92701b4675cc80d4 -SHA512 (WasmEdge-0.15.0-src.tar.gz) = 3a41f362852dd04dc441ebe10fac266703bb146100cceec64df3fce76f57960ac7dacfc9c1243f4177899a5c4d50166158908b0ec4e88e3f226cad2fd350e6cd +SHA512 (WasmEdge-0.17.0-src.tar.gz) = 3e0f9739c7cd5af4ad1e54ed009719c8e4d3d4bfc821103bd954f5bc662381278f97078b4d177f4fae599b3a199b55b6e1fd81ce75ab7711921779db2e89d567 diff --git a/wasmedge.spec b/wasmedge.spec index 164cb37..f5d288d 100644 --- a/wasmedge.spec +++ b/wasmedge.spec @@ -1,7 +1,7 @@ -%global version 0.15.0 +%global version 0.17.0 %global reponame WasmEdge %global capi_soname 0 -%global capi_version 0.1.0 +%global capi_version 0.1.1 Name: wasmedge Version: %{version} @@ -12,8 +12,6 @@ Summary: High performance WebAssembly Virtual Machine License: Apache-2.0 AND CC0-1.0 URL: https://github.com/%{reponame}/%{reponame} Source0: %{url}/releases/download/%{version}/%{reponame}-%{version}-src.tar.gz -# Patch from https://github.com/WasmEdge/WasmEdge/commit/37cc9fa19bd23edbbdaa9252059b17f191fa4d17 -Patch0: 0001-fix-runtime-refine-the-overflow-detection-when-wrapp.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: git @@ -104,6 +102,19 @@ cd .. %{_includedir}/%{name}/enum_types.h %{_includedir}/%{name}/int128.h %{_includedir}/%{name}/version.h +%{_includedir}/%{name}/wasmedge_ast.h +%{_includedir}/%{name}/wasmedge_basic.h +%{_includedir}/%{name}/wasmedge_compiler.h +%{_includedir}/%{name}/wasmedge_configure.h +%{_includedir}/%{name}/wasmedge_context.h +%{_includedir}/%{name}/wasmedge_deprecated.h +%{_includedir}/%{name}/wasmedge_execution.h +%{_includedir}/%{name}/wasmedge_experimental.h +%{_includedir}/%{name}/wasmedge_instance.h +%{_includedir}/%{name}/wasmedge_plugin.h +%{_includedir}/%{name}/wasmedge_tools.h +%{_includedir}/%{name}/wasmedge_value.h +%{_includedir}/%{name}/wasmedge_vm.h %{_includedir}/%{name}/wasmedge.h %{_libdir}/lib%{name}.so From 45cc82f2c244fac9cd3cb3fd2aaf5a57d096a66a Mon Sep 17 00:00:00 2001 From: hydai Date: Mon, 6 Jul 2026 14:27:42 +0000 Subject: [PATCH 6/6] Release 0.17.1 Signed-off-by: hydai --- .gitignore | 1 + sources | 2 +- wasmedge.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 83680b1..4ca6fec 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /WasmEdge-0.14.1-src.tar.gz /WasmEdge-0.15.0-src.tar.gz /WasmEdge-0.17.0-src.tar.gz +/WasmEdge-0.17.1-src.tar.gz diff --git a/sources b/sources index 8bce1f5..8de4d16 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (WasmEdge-0.17.0-src.tar.gz) = 3e0f9739c7cd5af4ad1e54ed009719c8e4d3d4bfc821103bd954f5bc662381278f97078b4d177f4fae599b3a199b55b6e1fd81ce75ab7711921779db2e89d567 +SHA512 (WasmEdge-0.17.1-src.tar.gz) = b5f1d7cde7fee8f43dff972135fb49489c0e752cd364aa13ecb15b7ccd0d81579ac2552d3e3a8f6f5a870313eda640010f833869a0089677a3c8d76476e0fbed diff --git a/wasmedge.spec b/wasmedge.spec index f5d288d..048b82d 100644 --- a/wasmedge.spec +++ b/wasmedge.spec @@ -1,4 +1,4 @@ -%global version 0.17.0 +%global version 0.17.1 %global reponame WasmEdge %global capi_soname 0 %global capi_version 0.1.1