pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/nodejs
Module Name: pkgsrc
Committed By: tnn
Date: Wed Aug 17 21:15:27 UTC 2022
Modified Files:
pkgsrc/lang/nodejs: distinfo
pkgsrc/lang/nodejs/patches:
patch-deps_v8_src_base_platform_platform-posix.cc
Log Message:
nodejs: clean up SunOS madvise(2) legacy mess
To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 pkgsrc/lang/nodejs/distinfo
cvs rdiff -u -r1.9 -r1.10 \
pkgsrc/lang/nodejs/patches/patch-deps_v8_src_base_platform_platform-posix.cc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/nodejs/distinfo
diff -u pkgsrc/lang/nodejs/distinfo:1.219 pkgsrc/lang/nodejs/distinfo:1.220
--- pkgsrc/lang/nodejs/distinfo:1.219 Wed Jul 27 08:42:23 2022
+++ pkgsrc/lang/nodejs/distinfo Wed Aug 17 21:15:27 2022
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.219 2022/07/27 08:42:23 adam Exp $
+$NetBSD: distinfo,v 1.220 2022/08/17 21:15:27 tnn Exp $
BLAKE2s (node-v18.7.0.tar.xz) = e7b09e919f7f1d222e6f92f9df48d31381799c40c70bb81de21fe7c83f57c556
SHA512 (node-v18.7.0.tar.xz) = 3da56b25f304b4e205c27a59f2e442e7216e494465e4cce9f51ffd3f7c7da3ab3519c4b7d1eb41a754b86ecfa1d138d270578aa3908b4fd42cc5dbfd389a6798
@@ -9,7 +9,7 @@ SHA1 (patch-deps_uv_common.gypi) = d38a9
SHA1 (patch-deps_uvwasi_include_wasi__serdes.h) = 32b85ef5824b96b35aba9280bbe7aa7899d9e5cf
SHA1 (patch-deps_v8_src_base_platform_platform-freebsd.cc) = b47025f33d2991275bbcd15dbabb28900afab0e1
SHA1 (patch-deps_v8_src_base_platform_platform-openbsd.cc) = 5e593879dbab095f99e82593272a0de91043f9a8
-SHA1 (patch-deps_v8_src_base_platform_platform-posix.cc) = 099d538e33611c7094d89669287de7b2a17c4b6e
+SHA1 (patch-deps_v8_src_base_platform_platform-posix.cc) = 0fdbc003d63429e9e097531d7848d16011f273a8
SHA1 (patch-deps_v8_src_base_platform_semaphore.cc) = 802a95f1b1d131e0d85c1f99c659cc68b31ba2f6
SHA1 (patch-deps_v8_src_base_strings.h) = 4d2b37491f2f74f1a573f8c1942790204e23a8bb
SHA1 (patch-deps_v8_src_codegen_arm_cpu-arm.cc) = 84c75d61bc99c2ff9adeac3152f5b11ebb0e582b
Index: pkgsrc/lang/nodejs/patches/patch-deps_v8_src_base_platform_platform-posix.cc
diff -u pkgsrc/lang/nodejs/patches/patch-deps_v8_src_base_platform_platform-posix.cc:1.9 pkgsrc/lang/nodejs/patches/patch-deps_v8_src_base_platform_platform-posix.cc:1.10
--- pkgsrc/lang/nodejs/patches/patch-deps_v8_src_base_platform_platform-posix.cc:1.9 Thu May 5 07:08:06 2022
+++ pkgsrc/lang/nodejs/patches/patch-deps_v8_src_base_platform_platform-posix.cc Wed Aug 17 21:15:27 2022
@@ -1,14 +1,30 @@
-$NetBSD: patch-deps_v8_src_base_platform_platform-posix.cc,v 1.9 2022/05/05 07:08:06 adam Exp $
+$NetBSD: patch-deps_v8_src_base_platform_platform-posix.cc,v 1.10 2022/08/17 21:15:27 tnn Exp $
Use sysconf(_SC_THREAD_STACK_MIN) instead of PTHREAD_STACK_MIN.
Cast explicitly.
+Remove legacy madvise(2) prototypes, prefer posix_madvise(2) if available.
Avoid using a random hint, some low numbers cause spurious ENOMEM on netbsd
(PR port-arm/55533)
---- deps/v8/src/base/platform/platform-posix.cc.orig 2022-05-03 08:18:09.000000000 +0000
+--- deps/v8/src/base/platform/platform-posix.cc.orig 2022-07-26 14:30:08.000000000 +0000
+++ deps/v8/src/base/platform/platform-posix.cc
-@@ -384,6 +384,10 @@ void* OS::GetRandomMmapAddr() {
+@@ -72,14 +72,6 @@
+ #define MAP_ANONYMOUS MAP_ANON
+ #endif
+
+-#if defined(V8_OS_SOLARIS)
+-#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__)
+-extern "C" int madvise(caddr_t, size_t, int);
+-#else
+-extern int madvise(caddr_t, size_t, int);
+-#endif
+-#endif
+-
+ #ifndef MADV_FREE
+ #define MADV_FREE MADV_DONTNEED
+ #endif
+@@ -384,6 +376,10 @@ void* OS::GetRandomMmapAddr() {
#endif
#endif
#endif
@@ -19,7 +35,22 @@ Avoid using a random hint, some low numb
return reinterpret_cast<void*>(raw_addr);
}
-@@ -733,6 +737,8 @@ int OS::GetCurrentThreadId() {
+@@ -515,12 +511,10 @@ bool OS::DiscardSystemPages(void* addres
+ // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED.
+ ret = madvise(address, size, MADV_DONTNEED);
+ }
+-#elif defined(_AIX) || defined(V8_OS_SOLARIS)
+- int ret = madvise(reinterpret_cast<caddr_t>(address), size, MADV_FREE);
++#elif defined(POSIX_MADV_DONTNEED)
++ int ret = posix_madvise(address, size, POSIX_MADV_DONTNEED);
+ if (ret != 0 && errno == ENOSYS)
+ return true; // madvise is not available on all systems.
+- if (ret != 0 && errno == EINVAL)
+- ret = madvise(reinterpret_cast<caddr_t>(address), size, MADV_DONTNEED);
+ #else
+ int ret = madvise(address, size, MADV_DONTNEED);
+ #endif
+@@ -733,6 +727,8 @@ int OS::GetCurrentThreadId() {
return static_cast<int>(syscall(__NR_gettid));
#elif V8_OS_ANDROID
return static_cast<int>(gettid());
@@ -28,7 +59,7 @@ Avoid using a random hint, some low numb
#elif V8_OS_AIX
return static_cast<int>(thread_self());
#elif V8_OS_FUCHSIA
-@@ -1000,7 +1006,11 @@ Thread::Thread(const Options& options)
+@@ -1000,7 +996,11 @@ Thread::Thread(const Options& options)
: data_(new PlatformData),
stack_size_(options.stack_size()),
start_semaphore_(nullptr) {
@@ -40,7 +71,7 @@ Avoid using a random hint, some low numb
if (stack_size_ > 0) stack_size_ = std::max(stack_size_, min_stack_size);
set_name(options.name());
}
-@@ -1016,7 +1026,7 @@ static void SetThreadName(const char* na
+@@ -1016,7 +1016,7 @@ static void SetThreadName(const char* na
pthread_set_name_np(pthread_self(), name);
#elif V8_OS_NETBSD
STATIC_ASSERT(Thread::kMaxThreadNameLength <= PTHREAD_MAX_NAMELEN_NP);
Home |
Main Index |
Thread Index |
Old Index