Skip to content

Commit f137d9c

Browse files
authored
deps: update libuv to 1.49.1
nodejs/node#55114
1 parent 75b03ba commit f137d9c

7 files changed

+57
-53
lines changed

patches/node/.patches

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ fix_handle_boringssl_and_openssl_incompatibilities.patch
99
fix_crypto_tests_to_run_with_bssl.patch
1010
fix_account_for_debugger_agent_race_condition.patch
1111
fix_readbarrier_undefined_symbol_error_on_woa_arm64.patch
12-
fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch
13-
fix_serdes_test.patch
1412
feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch
1513
support_v8_sandboxed_pointers.patch
1614
build_ensure_native_module_compilation_fails_if_not_using_a_new.patch
@@ -22,8 +20,6 @@ test_formally_mark_some_tests_as_flaky.patch
2220
fix_do_not_resolve_electron_entrypoints.patch
2321
ci_ensure_node_tests_set_electron_run_as_node.patch
2422
fix_assert_module_in_the_renderer_process.patch
25-
test_make_test-node-output-v8-warning_generic.patch
26-
fix_capture_embedder_exceptions_before_entering_v8.patch
2723
fix_revert_src_lb_reducing_c_calls_of_esm_legacy_main_resolve.patch
2824
fix_remove_deprecated_errno_constants.patch
2925
build_enable_perfetto.patch
@@ -43,3 +39,4 @@ test_use_static_method_names_in_call_stacks.patch
4339
build_use_third_party_simdutf.patch
4440
fix_remove_fastapitypedarray_usage.patch
4541
test_handle_explicit_resource_management_globals.patch
42+
linux_try_preadv64_pwritev64_before_preadv_pwritev_4683.patch

patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ index 712ed40f77e54d52d5b3c52bb68e2b7d48879812..6bcb7450975636b5dbc689470663ee37
5252
o['variables']['v8_enable_javascript_promise_hooks'] = 1
5353
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
5454
diff --git a/src/node.h b/src/node.h
55-
index e730bde9162df23ae0c0d52cfa594c1d7c4db28b..00de9a76d515290eba05aacada0942e611e11b22 100644
55+
index 7726d3de1e82689655e8fceb4135eec303498572..120e3a1042e29590cbbf4be258a1cd2d3d4f0043 100644
5656
--- a/src/node.h
5757
+++ b/src/node.h
5858
@@ -22,6 +22,12 @@

patches/node/fix_assert_module_in_the_renderer_process.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ index 59b5a16f1309a5e4055bccfdb7a529045ad30402..bfdaf6211466a01b64b7942f7b16c480
4444
let filename = call.getFileName();
4545
const line = call.getLineNumber() - 1;
4646
diff --git a/src/api/environment.cc b/src/api/environment.cc
47-
index 89ce587cac4506c4218a9316fe0b68070a7a8504..b74fb837fc1cfee839c8b5b8c0b9a6f805881206 100644
47+
index fc9b056d2f7e25109100fbde5f3ab0aebc8c619a..32fc075e97eebca6c47e796ac5308915746ffa2a 100644
4848
--- a/src/api/environment.cc
4949
+++ b/src/api/environment.cc
5050
@@ -247,6 +247,9 @@ void SetIsolateErrorHandlers(v8::Isolate* isolate, const IsolateSettings& s) {

patches/node/fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Ben Noordhuis <[email protected]>
3+
Date: Tue, 28 Jan 2025 09:27:58 +0100
4+
Subject: linux: try preadv64/pwritev64 before preadv/pwritev (#4683)
5+
6+
Fixes: https://github.com/libuv/libuv/issues/4678
7+
Refs: https://github.com/libuv/libuv/issues/4532
8+
9+
diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c
10+
index 239ecda16a7eb9b40453502cf0362ae66366cf72..1631d9340bc10c2ac4c3d53a63ed9bc10f3e1c7c 100644
11+
--- a/deps/uv/src/unix/fs.c
12+
+++ b/deps/uv/src/unix/fs.c
13+
@@ -461,12 +461,7 @@ static ssize_t uv__pwritev_emul(int fd,
14+
15+
/* The function pointer cache is an uintptr_t because _Atomic void*
16+
* doesn't work on macos/ios/etc...
17+
- * Disable optimization on armv7 to work around the bug described in
18+
- * https://github.com/libuv/libuv/issues/4532
19+
*/
20+
-#if defined(__arm__) && (__ARM_ARCH == 7)
21+
-__attribute__((optimize("O0")))
22+
-#endif
23+
static ssize_t uv__preadv_or_pwritev(int fd,
24+
const struct iovec* bufs,
25+
size_t nbufs,
26+
@@ -479,7 +474,12 @@ static ssize_t uv__preadv_or_pwritev(int fd,
27+
p = (void*) atomic_load_explicit(cache, memory_order_relaxed);
28+
if (p == NULL) {
29+
#ifdef RTLD_DEFAULT
30+
- p = dlsym(RTLD_DEFAULT, is_pread ? "preadv" : "pwritev");
31+
+ /* Try _LARGEFILE_SOURCE version of preadv/pwritev first,
32+
+ * then fall back to the plain version, for libcs like musl.
33+
+ */
34+
+ p = dlsym(RTLD_DEFAULT, is_pread ? "preadv64" : "pwritev64");
35+
+ if (p == NULL)
36+
+ p = dlsym(RTLD_DEFAULT, is_pread ? "preadv" : "pwritev");
37+
dlerror(); /* Clear errors. */
38+
#endif /* RTLD_DEFAULT */
39+
if (p == NULL)
40+
@@ -487,10 +487,7 @@ static ssize_t uv__preadv_or_pwritev(int fd,
41+
atomic_store_explicit(cache, (uintptr_t) p, memory_order_relaxed);
42+
}
43+
44+
- /* Use memcpy instead of `f = p` to work around a compiler bug,
45+
- * see https://github.com/libuv/libuv/issues/4532
46+
- */
47+
- memcpy(&f, &p, sizeof(p));
48+
+ f = p;
49+
return f(fd, bufs, nbufs, off);
50+
}
51+

patches/node/src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ index 0a3f09ebc7e2e7c1f8b9499d4439e2ca90b86810..d6f412cb13460f97f9444af397c8025c
161161
inline MultiIsolatePlatform* platform() const;
162162
inline const SnapshotData* snapshot_data() const;
163163
diff --git a/src/node.h b/src/node.h
164-
index 00de9a76d515290eba05aacada0942e611e11b22..e62501ae102a73408849fecdba703abe5c84e24d 100644
164+
index 120e3a1042e29590cbbf4be258a1cd2d3d4f0043..afb26ec5690ccd65a3c36f8b8a1b2de416b9d843 100644
165165
--- a/src/node.h
166166
+++ b/src/node.h
167-
@@ -1555,24 +1555,14 @@ void RegisterSignalHandler(int signal,
167+
@@ -1552,24 +1552,14 @@ void RegisterSignalHandler(int signal,
168168
bool reset_handler = false);
169169
#endif // _WIN32
170170

patches/node/support_v8_sandboxed_pointers.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This refactors several allocators to allocate within the V8 memory cage,
77
allowing them to be compatible with the V8_SANDBOXED_POINTERS feature.
88

99
diff --git a/src/api/environment.cc b/src/api/environment.cc
10-
index e044f10284f31f1862b18be752a04b3bd5d53401..89ce587cac4506c4218a9316fe0b68070a7a8504 100644
10+
index ad323fc800a33c010b0504a4aa55c107498dee26..fc9b056d2f7e25109100fbde5f3ab0aebc8c619a 100644
1111
--- a/src/api/environment.cc
1212
+++ b/src/api/environment.cc
1313
@@ -102,6 +102,14 @@ MaybeLocal<Value> PrepareStackTraceCallback(Local<Context> context,

0 commit comments

Comments
 (0)