Browse Source

nodejs: upgrade 22.15.1 -> 22.16.0

Drop the backported zlib-fix-pointer-alignment patch.  It is included in this release.
  https://github.com/nodejs/node/commit/f2159f2a44

Changelog: https://github.com/nodejs/node/releases/tag/v22.16.0

Signed-off-by: Jason Schonberg <schonm@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Jason Schonberg 1 week ago
parent
commit
58ba5cbab3

+ 0 - 0
meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.15/oe-npm-cache → meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.16/oe-npm-cache


+ 0 - 0
meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.15.bb → meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.16.bb


+ 0 - 64
meta-oe/recipes-devtools/nodejs/nodejs/zlib-fix-pointer-alignment.patch

@@ -1,64 +0,0 @@
-From dc035bbc9b310ff8067bc0dad22230978489c061 Mon Sep 17 00:00:00 2001
-From: jhofstee <jeroen@myspectrum.nl>
-Date: Wed, 9 Apr 2025 12:24:13 +0200
-Subject: [PATCH] zlib: fix pointer alignment
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The function AllocForBrotli prefixes the allocated memory with its
-size, and returns a pointer to the region after it. This pointer can
-however no longer be suitably aligned. Correct this by allocating
-the maximum of the the size of the size_t and the max alignment.
-
-On Arm 32bits the size_t is 4 bytes long, but the alignment is 8 for
-some NEON instructions. When Brotli is compiled with optimizations
-enabled newer GCC versions will use the NEON instructions and trigger
-a bus error killing node.
-
-see https://github.com/google/brotli/issues/1159
-
-PR-URL: https://github.com/nodejs/node/pull/57727
-Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
-Reviewed-By: Tobias Nießen <tniessen@tnie.de>
-Reviewed-By: Daniel Lemire <daniel@lemire.me>
-Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
-
-Upstream-Status: Backport [https://github.com/nodejs/node/commit/dc035bbc9b310ff8067bc0dad22230978489c061]
----
- src/node_zlib.cc | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/src/node_zlib.cc b/src/node_zlib.cc
-index 0b7c47b326c7c5..7e6b38ecd1aa36 100644
---- a/src/node_zlib.cc
-+++ b/src/node_zlib.cc
-@@ -608,7 +608,8 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
-   }
- 
-   static void* AllocForBrotli(void* data, size_t size) {
--    size += sizeof(size_t);
-+    constexpr size_t offset = std::max(sizeof(size_t), alignof(max_align_t));
-+    size += offset;
-     CompressionStream* ctx = static_cast<CompressionStream*>(data);
-     char* memory = UncheckedMalloc(size);
-     if (memory == nullptr) [[unlikely]] {
-@@ -617,7 +618,7 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
-     *reinterpret_cast<size_t*>(memory) = size;
-     ctx->unreported_allocations_.fetch_add(size,
-                                            std::memory_order_relaxed);
--    return memory + sizeof(size_t);
-+    return memory + offset;
-   }
- 
-   static void FreeForZlib(void* data, void* pointer) {
-@@ -625,7 +626,8 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
-       return;
-     }
-     CompressionStream* ctx = static_cast<CompressionStream*>(data);
--    char* real_pointer = static_cast<char*>(pointer) - sizeof(size_t);
-+    constexpr size_t offset = std::max(sizeof(size_t), alignof(max_align_t));
-+    char* real_pointer = static_cast<char*>(pointer) - offset;
-     size_t real_size = *reinterpret_cast<size_t*>(real_pointer);
-     ctx->unreported_allocations_.fetch_sub(real_size,
-                                            std::memory_order_relaxed);

+ 1 - 2
meta-oe/recipes-devtools/nodejs/nodejs_22.15.1.bb → meta-oe/recipes-devtools/nodejs/nodejs_22.16.0.bb

@@ -29,7 +29,6 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://0001-deps-disable-io_uring-support-in-libuv.patch \
            file://0001-positional-args.patch \
            file://0001-custom-env.patch \
-           file://zlib-fix-pointer-alignment.patch \
            file://run-ptest \
            "
 SRC_URI:append:class-target = " \
@@ -38,7 +37,7 @@ SRC_URI:append:class-target = " \
 SRC_URI:append:toolchain-clang:powerpc64le = " \
            file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \
            "
-SRC_URI[sha256sum] = "c19f0177d21c621746625e5f37590bd0d79a72043b77b53784cba5f145e7263e"
+SRC_URI[sha256sum] = "720894f323e5c1ac24968eb2676660c90730d715cb7f090be71a668662a17c37"
 
 S = "${WORKDIR}/node-v${PV}"