summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/nodejs
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/nodejs')
-rwxr-xr-xmeta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.16/oe-npm-cache (renamed from meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.15/oe-npm-cache)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.16.bb (renamed from meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.15.bb)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/zlib-fix-pointer-alignment.patch64
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs_22.16.0.bb (renamed from meta-oe/recipes-devtools/nodejs/nodejs_22.15.1.bb)3
4 files changed, 1 insertions, 66 deletions
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.15/oe-npm-cache b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.16/oe-npm-cache
index eb0f143eae..eb0f143eae 100755
--- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.15/oe-npm-cache
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.16/oe-npm-cache
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.15.bb b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.16.bb
index d4b818f967..d4b818f967 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.15.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.16.bb
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/zlib-fix-pointer-alignment.patch b/meta-oe/recipes-devtools/nodejs/nodejs/zlib-fix-pointer-alignment.patch
deleted file mode 100644
index e372911193..0000000000
--- a/meta-oe/recipes-devtools/nodejs/nodejs/zlib-fix-pointer-alignment.patch
+++ /dev/null
@@ -1,64 +0,0 @@
1From dc035bbc9b310ff8067bc0dad22230978489c061 Mon Sep 17 00:00:00 2001
2From: jhofstee <jeroen@myspectrum.nl>
3Date: Wed, 9 Apr 2025 12:24:13 +0200
4Subject: [PATCH] zlib: fix pointer alignment
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9The function AllocForBrotli prefixes the allocated memory with its
10size, and returns a pointer to the region after it. This pointer can
11however no longer be suitably aligned. Correct this by allocating
12the maximum of the the size of the size_t and the max alignment.
13
14On Arm 32bits the size_t is 4 bytes long, but the alignment is 8 for
15some NEON instructions. When Brotli is compiled with optimizations
16enabled newer GCC versions will use the NEON instructions and trigger
17a bus error killing node.
18
19see https://github.com/google/brotli/issues/1159
20
21PR-URL: https://github.com/nodejs/node/pull/57727
22Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
23Reviewed-By: Tobias Nießen <tniessen@tnie.de>
24Reviewed-By: Daniel Lemire <daniel@lemire.me>
25Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
26
27Upstream-Status: Backport [https://github.com/nodejs/node/commit/dc035bbc9b310ff8067bc0dad22230978489c061]
28---
29 src/node_zlib.cc | 8 +++++---
30 1 file changed, 5 insertions(+), 3 deletions(-)
31
32diff --git a/src/node_zlib.cc b/src/node_zlib.cc
33index 0b7c47b326c7c5..7e6b38ecd1aa36 100644
34--- a/src/node_zlib.cc
35+++ b/src/node_zlib.cc
36@@ -608,7 +608,8 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
37 }
38
39 static void* AllocForBrotli(void* data, size_t size) {
40- size += sizeof(size_t);
41+ constexpr size_t offset = std::max(sizeof(size_t), alignof(max_align_t));
42+ size += offset;
43 CompressionStream* ctx = static_cast<CompressionStream*>(data);
44 char* memory = UncheckedMalloc(size);
45 if (memory == nullptr) [[unlikely]] {
46@@ -617,7 +618,7 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
47 *reinterpret_cast<size_t*>(memory) = size;
48 ctx->unreported_allocations_.fetch_add(size,
49 std::memory_order_relaxed);
50- return memory + sizeof(size_t);
51+ return memory + offset;
52 }
53
54 static void FreeForZlib(void* data, void* pointer) {
55@@ -625,7 +626,8 @@ class CompressionStream : public AsyncWrap, public ThreadPoolWork {
56 return;
57 }
58 CompressionStream* ctx = static_cast<CompressionStream*>(data);
59- char* real_pointer = static_cast<char*>(pointer) - sizeof(size_t);
60+ constexpr size_t offset = std::max(sizeof(size_t), alignof(max_align_t));
61+ char* real_pointer = static_cast<char*>(pointer) - offset;
62 size_t real_size = *reinterpret_cast<size_t*>(real_pointer);
63 ctx->unreported_allocations_.fetch_sub(real_size,
64 std::memory_order_relaxed);
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_22.15.1.bb b/meta-oe/recipes-devtools/nodejs/nodejs_22.16.0.bb
index 9798635ba2..c2bf3b6bd3 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_22.15.1.bb
+++ b/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 \
29 file://0001-deps-disable-io_uring-support-in-libuv.patch \ 29 file://0001-deps-disable-io_uring-support-in-libuv.patch \
30 file://0001-positional-args.patch \ 30 file://0001-positional-args.patch \
31 file://0001-custom-env.patch \ 31 file://0001-custom-env.patch \
32 file://zlib-fix-pointer-alignment.patch \
33 file://run-ptest \ 32 file://run-ptest \
34 " 33 "
35SRC_URI:append:class-target = " \ 34SRC_URI:append:class-target = " \
@@ -38,7 +37,7 @@ SRC_URI:append:class-target = " \
38SRC_URI:append:toolchain-clang:powerpc64le = " \ 37SRC_URI:append:toolchain-clang:powerpc64le = " \
39 file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \ 38 file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \
40 " 39 "
41SRC_URI[sha256sum] = "c19f0177d21c621746625e5f37590bd0d79a72043b77b53784cba5f145e7263e" 40SRC_URI[sha256sum] = "720894f323e5c1ac24968eb2676660c90730d715cb7f090be71a668662a17c37"
42 41
43S = "${WORKDIR}/node-v${PV}" 42S = "${WORKDIR}/node-v${PV}"
44 43