Commit 6faa33426f9 for nodejs
commit 6faa33426f9007e4dabd0152c453837f507dab2c
Author: ishabi <ilyasshabi94@gmail.com>
Date: Wed Sep 16 10:34:17 2026 +0200
deps: V8: cherry-pick 315d9c945ac3
Original commit message:
Solaris: implement Stack::ObtainCurrentThreadStackReservedLimit
Port 5a54f45b671bdf47e083ffbad547713d8bacb28f
Solaris is excluded from the generic POSIX implementation, so implement
the function using pthread_attr_get_np() and pthread_attr_getstack(),
consistent with ObtainCurrentThreadStackStart(). The base returned by
pthread_attr_getstack() maps to the lowest address of the thread's
reserved stack.
Change-Id: I08a5b4cd80180b04496b22989cb976d1c24ce8e6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8413453
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Joyee Cheung <joyee@igalia.com>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#109953}
Refs: https://github.com/v8/v8/commit/315d9c945ac3b1612c3690fbe69e48acce263bed
Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65161
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
diff --git a/common.gypi b/common.gypi
index f34b60710f6..58d2d288f7f 100644
--- a/common.gypi
+++ b/common.gypi
@@ -44,7 +44,7 @@
# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
- 'v8_embedder_string': '-node.15',
+ 'v8_embedder_string': '-node.16',
##### V8 defaults for Node.js #####
diff --git a/deps/v8/src/base/platform/platform-solaris.cc b/deps/v8/src/base/platform/platform-solaris.cc
index c991d2edac5..374728a2eaa 100644
--- a/deps/v8/src/base/platform/platform-solaris.cc
+++ b/deps/v8/src/base/platform/platform-solaris.cc
@@ -89,5 +89,23 @@ Stack::StackSlot Stack::ObtainCurrentThreadStackStart() {
return nullptr;
}
+// static
+Stack::StackSlot Stack::ObtainCurrentThreadStackReservedLimit() {
+ pthread_attr_t attr;
+ int error;
+ pthread_attr_init(&attr);
+ error = pthread_attr_get_np(pthread_self(), &attr);
+ if (!error) {
+ void* base;
+ size_t size;
+ error = pthread_attr_getstack(&attr, &base, &size);
+ CHECK(!error);
+ pthread_attr_destroy(&attr);
+ return base;
+ }
+ pthread_attr_destroy(&attr);
+ return nullptr;
+}
+
} // namespace base
} // namespace v8