diff --git a/common.gypi b/common.gypi index e8c157a1c07..d52123d8de0 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.9', + 'v8_embedder_string': '-node.10', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/base/platform/platform-posix.cc b/deps/v8/src/base/platform/platform-posix.cc index 66fd5764427..df122799fdc 100644 --- a/deps/v8/src/base/platform/platform-posix.cc +++ b/deps/v8/src/base/platform/platform-posix.cc @@ -1511,6 +1511,14 @@ Stack::StackSlot Stack::ObtainCurrentThreadStackReservedLimit() { } return stack.ss_sp; #else +// For most libcs, pthread_getattr_np() returns the the stack reserved +// limit on the main thread, but musl only returns the current high-water +// mark at the time of the call. There's no macro to detect musl, so +// let the caller do a fallback in cases where the libc is not one that +// is known to work. +#if V8_OS_LINUX && !V8_LIBC_GLIBC && !V8_LIBC_BIONIC && !V8_LIBC_UCLIBC + if (syscall(__NR_gettid) == getpid()) return nullptr; +#endif pthread_attr_t attr; int error = pthread_getattr_np(pthread_self(), &attr); if (error) {