Skip to content

Commit 9590c15

Browse files
santigimenomarco-ippolito
authored andcommitted
deps: upgrade libuv to 1.48.0
PR-URL: #51698
1 parent 8547196 commit 9590c15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1142
-271
lines changed

deps/uv/.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
*.sdf
88
*.suo
99
.vs/
10+
.vscode/
1011
*.VC.db
1112
*.VC.opendb
1213
core
14+
.cache
1315
vgcore.*
1416
.buildstamp
1517
.dirstamp
@@ -74,3 +76,5 @@ cmake-build-debug/
7476

7577
# make dist output
7678
libuv-*.tar.*
79+
/dist.libuv.org/
80+
/libuv-release-tool/

deps/uv/AUTHORS

+7
Original file line numberDiff line numberDiff line change
@@ -560,3 +560,10 @@ prubel <paul@rubels.net>
560560
Per Allansson <65364157+per-allansson@users.noreply.github.com>
561561
Matheus Izvekov <mizvekov@gmail.com>
562562
Christian Heimlich <chris@pcserenity.com>
563+
Hao Hu <33607772+hhu8@users.noreply.github.com>
564+
matoro <12038583+matoro@users.noreply.github.com>
565+
Bo Anderson <mail@boanderson.me>
566+
Ardi Nugraha <33378542+ardi-nugraha@users.noreply.github.com>
567+
Anton Bachin <antonbachin@yahoo.com>
568+
Trevor Flynn <trevorflynn@liquidcrystalstudios.com>
569+
Andy Pan <panjf2000@gmail.com>

deps/uv/CMakeLists.txt

+25-2
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,11 @@ list(APPEND uv_cflags ${lint-utf8-msvc} )
161161
check_c_compiler_flag(-fno-strict-aliasing UV_F_STRICT_ALIASING)
162162
list(APPEND uv_cflags $<$<BOOL:${UV_F_STRICT_ALIASING}>:-fno-strict-aliasing>)
163163

164+
if (MSVC)
165+
# Error on calling undeclared functions.
166+
list(APPEND uv_cflags "/we4013")
167+
endif()
168+
164169
set(uv_sources
165170
src/fs-poll.c
166171
src/idna.c
@@ -176,7 +181,7 @@ set(uv_sources
176181
src/version.c)
177182

178183
if(WIN32)
179-
list(APPEND uv_defines WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0602)
184+
list(APPEND uv_defines WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0602 _CRT_DECLARE_NONSTDC_NAMES=0)
180185
list(APPEND uv_libraries
181186
psapi
182187
user32
@@ -186,7 +191,6 @@ if(WIN32)
186191
ws2_32
187192
dbghelp
188193
ole32
189-
uuid
190194
shell32)
191195
list(APPEND uv_sources
192196
src/win/async.c
@@ -655,6 +659,7 @@ if(LIBUV_BUILD_TESTS)
655659
test/test-thread-affinity.c
656660
test/test-thread-equal.c
657661
test/test-thread.c
662+
test/test-thread-priority.c
658663
test/test-threadpool-cancel.c
659664
test/test-threadpool.c
660665
test/test-timer-again.c
@@ -702,6 +707,12 @@ if(LIBUV_BUILD_TESTS)
702707
set_tests_properties(uv_test PROPERTIES ENVIRONMENT
703708
"LIBPATH=${CMAKE_BINARY_DIR}:$ENV{LIBPATH}")
704709
endif()
710+
if(WIN32)
711+
add_custom_command(TARGET uv_run_tests POST_BUILD
712+
COMMAND "${CMAKE_COMMAND}" -E copy
713+
"$<TARGET_FILE:uv_run_tests>"
714+
"$<TARGET_FILE_DIR:uv_run_tests>/uv_run_tests_no_ext")
715+
endif()
705716
add_executable(uv_run_tests_a ${uv_test_sources} uv_win_longpath.manifest)
706717
target_compile_definitions(uv_run_tests_a PRIVATE ${uv_defines})
707718
target_compile_options(uv_run_tests_a PRIVATE ${uv_cflags})
@@ -718,6 +729,12 @@ if(LIBUV_BUILD_TESTS)
718729
set_target_properties(uv_run_tests PROPERTIES LINKER_LANGUAGE CXX)
719730
set_target_properties(uv_run_tests_a PROPERTIES LINKER_LANGUAGE CXX)
720731
endif()
732+
if(WIN32)
733+
add_custom_command(TARGET uv_run_tests_a POST_BUILD
734+
COMMAND "${CMAKE_COMMAND}" -E copy
735+
"$<TARGET_FILE:uv_run_tests_a>"
736+
"$<TARGET_FILE_DIR:uv_run_tests_a>/uv_run_tests_a_no_ext")
737+
endif()
721738
endif()
722739

723740
# Now for some gibbering horrors from beyond the stars...
@@ -762,6 +779,12 @@ endif()
762779

763780
if(MSVC)
764781
set(CMAKE_DEBUG_POSTFIX d)
782+
get_filename_component(CMAKE_C_COMPILER_DIR ${CMAKE_C_COMPILER} DIRECTORY)
783+
if(ASAN)
784+
file(INSTALL "${CMAKE_C_COMPILER_DIR}/llvm-symbolizer.exe" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
785+
file(INSTALL "${CMAKE_C_COMPILER_DIR}/clang_rt.asan_dynamic-x86_64.dll" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
786+
file(INSTALL "${CMAKE_C_COMPILER_DIR}/clang_rt.asan_dbg_dynamic-x86_64.dll" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
787+
endif()
765788
endif()
766789

767790
message(STATUS "summary of build options:

deps/uv/ChangeLog

+92-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,95 @@
1-
2023.11.06, Version 1.47.0 (Stable)
1+
2024.02.07, Version 1.48.0 (Stable)
2+
3+
Changes since version 1.47.0:
4+
5+
* misc: remove deprecated stalebot file (Jameson Nash)
6+
7+
* build: disable windows asan buildbot (Ben Noordhuis)
8+
9+
* test: don't run tcp_writealot under msan (Ben Noordhuis)
10+
11+
* build,win: remove extraneous -lshell32 (Ben Noordhuis)
12+
13+
* unix: ignore ifaddrs with NULL ifa_addr (Stephen Gallagher)
14+
15+
* unix,win: utility for setting priority for thread (Hao Hu)
16+
17+
* pipe: add back error handling to connect / bind (Jameson Nash)
18+
19+
* test: check if ipv6 link-local traffic is routable (Ben Noordhuis)
20+
21+
* win: remove check for UV_PIPE_NO_TRUNCATE (Jameson Nash)
22+
23+
* linux: disable io_uring on hppa below kernel 6.1.51 (matoro)
24+
25+
* unix,win: fix read past end of pipe name buffer (Ben Noordhuis)
26+
27+
* unix: unbreak macOS < 10.14 (Sergey Fedorov)
28+
29+
* aix: disable ipv6 link local (Abdirahim Musse)
30+
31+
* doc: move cjihrig to emeriti (cjihrig)
32+
33+
* unix: correct pwritev conditional (Bo Anderson)
34+
35+
* test_fs.c: Fix issue on 32-bit systems using btrfs (Stephen Gallagher)
36+
37+
* misc: ignore libuv-release-tool files (Jameson Nash)
38+
39+
* win: honor NoDefaultCurrentDirectoryInExePath env var (Ardi Nugraha)
40+
41+
* idna: fix compilation warning (Saúl Ibarra Corretgé)
42+
43+
* linux: remove HAVE_IFADDRS_H macro (Ben Noordhuis)
44+
45+
* test: skip tcp-write-in-a-row on IBM i (Abdirahim Musse)
46+
47+
* build,win: work around missing uuid.dll on MinGW (Anton Bachin)
48+
49+
* win: stop using deprecated names (Matheus Izvekov)
50+
51+
* unix,win: fix busy loop with zero timeout timers (Matheus Izvekov)
52+
53+
* aix,ibmi: use uv_interface_addresses instead of getifaddrs (Abdirahim Musse)
54+
55+
* linux: fix bind/connect for abstract sockets (Santiago Gimeno)
56+
57+
* win: replace c99 comments with c89 comments (Trevor Flynn)
58+
59+
* build: add .cache clangd folder to .gitignore (Juan José Arboleda)
60+
61+
* unix: support full TCP keep-alive on Solaris (Andy Pan)
62+
63+
* freebsd: fix F_KINFO file path handling (David Carlier)
64+
65+
* linux: retry fs op if unsupported by io_uring (Santiago Gimeno)
66+
67+
* freebsd: fix build on non-intel archs (David Carlier)
68+
69+
* unix: optimize uv__tcp_keepalive cpp directives (Andy Pan)
70+
71+
* linux: disable io_uring on ppc64 and ppc64le (Brad King)
72+
73+
* doc: add very basic Security Policy document (Santiago Gimeno)
74+
75+
* build: re-enable msvc-asan job on CI (Jameson Nash)
76+
77+
* win/spawn: optionally run executable paths with no file extension (Brad King)
78+
79+
* win: fix ESRCH implementation (Jameson Nash)
80+
81+
* unix,win: reset the timer queue on stop (Santiago Gimeno)
82+
83+
* fix: always zero-terminate idna output (Ben Noordhuis)
84+
85+
* fix: reject zero-length idna inputs (Ben Noordhuis)
86+
87+
* test: empty strings are not valid IDNA (Santiago Gimeno)
88+
89+
* Merge pull request from GHSA-f74f-cvh7-c6q6 (Ben Noordhuis)
90+
91+
92+
2023.11.06, Version 1.47.0 (Stable), be6b81a352d17513c95be153afcb3148f1a451cd
293

394
Changes since version 1.46.0:
495

deps/uv/MAINTAINERS.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ libuv is currently managed by the following individuals:
44

55
* **Ben Noordhuis** ([@bnoordhuis](https://github.com/bnoordhuis))
66
- GPG key: D77B 1E34 243F BAF0 5F8E 9CC3 4F55 C8C8 46AB 89B9 (pubkey-bnoordhuis)
7-
* **Colin Ihrig** ([@cjihrig](https://github.com/cjihrig))
8-
- GPG key: 94AE 3667 5C46 4D64 BAFA 68DD 7434 390B DBE9 B9C5 (pubkey-cjihrig)
9-
- GPG key: 5735 3E0D BDAA A7E8 39B6 6A1A FF47 D5E4 AD8B 4FDC (pubkey-cjihrig-kb)
107
* **Jameson Nash** ([@vtjnash](https://github.com/vtjnash))
118
- GPG key: AEAD 0A4B 6867 6775 1A0E 4AEF 34A2 5FB1 2824 6514 (pubkey-vtjnash)
129
- GPG key: CFBB 9CA9 A5BE AFD7 0E2B 3C5A 79A6 7C55 A367 9C8B (pubkey2022-vtjnash)
@@ -27,6 +24,9 @@ libuv is currently managed by the following individuals:
2724
* **Anna Henningsen** ([@addaleax](https://github.com/addaleax))
2825
* **Bartosz Sosnowski** ([@bzoz](https://github.com/bzoz))
2926
* **Bert Belder** ([@piscisaureus](https://github.com/piscisaureus))
27+
* **Colin Ihrig** ([@cjihrig](https://github.com/cjihrig))
28+
- GPG key: 94AE 3667 5C46 4D64 BAFA 68DD 7434 390B DBE9 B9C5 (pubkey-cjihrig)
29+
- GPG key: 5735 3E0D BDAA A7E8 39B6 6A1A FF47 D5E4 AD8B 4FDC (pubkey-cjihrig-kb)
3030
* **Fedor Indutny** ([@indutny](https://github.com/indutny))
3131
- GPG key: AF2E EA41 EC34 47BF DD86 FED9 D706 3CCE 19B7 E890 (pubkey-indutny)
3232
* **Imran Iqbal** ([@imran-iq](https://github.com/imran-iq))

deps/uv/Makefile.am

+7
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ TESTS = test/run-tests
136136
check_PROGRAMS = test/run-tests
137137
test_run_tests_CFLAGS = $(AM_CFLAGS)
138138

139+
if WINNT
140+
check-am: test/run-tests_no_ext
141+
test/run-tests_no_ext: test/run-tests$(EXEEXT)
142+
cp test/run-tests$(EXEEXT) test/run-tests_no_ext
143+
endif
144+
139145
if SUNOS
140146
# Can't be turned into a CC_CHECK_CFLAGS in configure.ac, it makes compilers
141147
# on other platforms complain that the argument is unused during compilation.
@@ -286,6 +292,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \
286292
test/test-thread-equal.c \
287293
test/test-thread.c \
288294
test/test-thread-affinity.c \
295+
test/test-thread-priority.c \
289296
test/test-threadpool-cancel.c \
290297
test/test-threadpool.c \
291298
test/test-timer-again.c \

deps/uv/SECURITY.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Currently, we are providing security updates for the latest release in the v1.x series:
6+
7+
| Version | Supported |
8+
| ------- | ------------------ |
9+
| Latest v1.x | :white_check_mark: |
10+
11+
## Reporting a Vulnerability
12+
13+
If you believe you have found a security vulnerability in `libuv`, please use the [GitHub's private vulnerability reporting feature](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability) in the [libuv repository](https://github.com/libuv/libuv) to report it to us.
14+
15+
This will allow us to assess the risk, and make a fix available before we add a bug report to the GitHub repository.
16+
17+
Please do:
18+
19+
* Provide as much information as you can about the vulnerability.
20+
* Provide details about your configuration and environment, if applicable.
21+
22+
Please do not:
23+
24+
* Post any information about the vulnerability in public places.
25+
* Attempt to exploit the vulnerability yourself.
26+
27+
We take all security bugs seriously. Thank you for improving the security of `libuv`. We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.

deps/uv/configure.ac

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1414

1515
AC_PREREQ(2.57)
16-
AC_INIT([libuv], [1.47.0], [https://github.com/libuv/libuv/issues])
16+
AC_INIT([libuv], [1.48.0], [https://github.com/libuv/libuv/issues])
1717
AC_CONFIG_MACRO_DIR([m4])
1818
m4_include([m4/libuv-extra-automake-flags.m4])
1919
m4_include([m4/as_case.m4])
@@ -74,7 +74,7 @@ AM_CONDITIONAL([OS400], [AS_CASE([$host_os],[os400], [true], [false])
7474
AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])])
7575
AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])])
7676
AS_CASE([$host_os],[mingw*], [
77-
LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv -luser32 -ldbghelp -lole32 -luuid -lshell32"
77+
LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -luserenv -luser32 -ldbghelp -lole32 -lshell32"
7878
])
7979
AS_CASE([$host_os], [solaris2.10], [
8080
CFLAGS="$CFLAGS -DSUNOS_NO_IFADDRS"

deps/uv/docs/src/process.rst

+11-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,14 @@ Data types
8585
* option is only meaningful on Windows systems. On Unix it is silently
8686
* ignored.
8787
*/
88-
UV_PROCESS_WINDOWS_HIDE_GUI = (1 << 6)
88+
UV_PROCESS_WINDOWS_HIDE_GUI = (1 << 6),
89+
/*
90+
* On Windows, if the path to the program to execute, specified in
91+
* uv_process_options_t's file field, has a directory component,
92+
* search for the exact file name before trying variants with
93+
* extensions like '.exe' or '.cmd'.
94+
*/
95+
UV_PROCESS_WINDOWS_FILE_PATH_EXACT_NAME = (1 << 7)
8996
};
9097

9198
.. c:type:: uv_stdio_container_t
@@ -262,6 +269,9 @@ API
262269
.. versionchanged:: 1.24.0 Added `UV_PROCESS_WINDOWS_HIDE_CONSOLE` and
263270
`UV_PROCESS_WINDOWS_HIDE_GUI` flags.
264271
272+
.. versionchanged:: 1.48.0 Added the
273+
`UV_PROCESS_WINDOWS_FILE_PATH_EXACT_NAME` flag.
274+
265275
.. c:function:: int uv_process_kill(uv_process_t* handle, int signum)
266276
267277
Sends the specified signal to the given process handle. Check the documentation

deps/uv/docs/src/threading.rst

+15
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,21 @@ Threads
132132
.. c:function:: int uv_thread_join(uv_thread_t *tid)
133133
.. c:function:: int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2)
134134
135+
.. c:function:: int uv_thread_setpriority(uv_thread_t tid, int priority)
136+
If the function succeeds, the return value is 0.
137+
If the function fails, the return value is less than zero.
138+
Sets the scheduling priority of the thread specified by tid. It requires elevated
139+
privilege to set specific priorities on some platforms.
140+
The priority can be set to the following constants. UV_THREAD_PRIORITY_HIGHEST,
141+
UV_THREAD_PRIORITY_ABOVE_NORMAL, UV_THREAD_PRIORITY_NORMAL,
142+
UV_THREAD_PRIORITY_BELOW_NORMAL, UV_THREAD_PRIORITY_LOWEST.
143+
.. c:function:: int uv_thread_getpriority(uv_thread_t tid, int* priority)
144+
If the function succeeds, the return value is 0.
145+
If the function fails, the return value is less than zero.
146+
Retrieves the scheduling priority of the thread specified by tid. The value in the
147+
output parameter priority is platform dependent.
148+
For Linux, when schedule policy is SCHED_OTHER (default), priority is 0.
149+
135150
Thread-local storage
136151
^^^^^^^^^^^^^^^^^^^^
137152

deps/uv/include/uv.h

+19-1
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,14 @@ enum uv_process_flags {
11061106
* option is only meaningful on Windows systems. On Unix it is silently
11071107
* ignored.
11081108
*/
1109-
UV_PROCESS_WINDOWS_HIDE_GUI = (1 << 6)
1109+
UV_PROCESS_WINDOWS_HIDE_GUI = (1 << 6),
1110+
/*
1111+
* On Windows, if the path to the program to execute, specified in
1112+
* uv_process_options_t's file field, has a directory component,
1113+
* search for the exact file name before trying variants with
1114+
* extensions like '.exe' or '.cmd'.
1115+
*/
1116+
UV_PROCESS_WINDOWS_FILE_PATH_EXACT_NAME = (1 << 7)
11101117
};
11111118

11121119
/*
@@ -1284,6 +1291,17 @@ UV_EXTERN uv_pid_t uv_os_getppid(void);
12841291
UV_EXTERN int uv_os_getpriority(uv_pid_t pid, int* priority);
12851292
UV_EXTERN int uv_os_setpriority(uv_pid_t pid, int priority);
12861293

1294+
enum {
1295+
UV_THREAD_PRIORITY_HIGHEST = 2,
1296+
UV_THREAD_PRIORITY_ABOVE_NORMAL = 1,
1297+
UV_THREAD_PRIORITY_NORMAL = 0,
1298+
UV_THREAD_PRIORITY_BELOW_NORMAL = -1,
1299+
UV_THREAD_PRIORITY_LOWEST = -2,
1300+
};
1301+
1302+
UV_EXTERN int uv_thread_getpriority(uv_thread_t tid, int* priority);
1303+
UV_EXTERN int uv_thread_setpriority(uv_thread_t tid, int priority);
1304+
12871305
UV_EXTERN unsigned int uv_available_parallelism(void);
12881306
UV_EXTERN int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count);
12891307
UV_EXTERN void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count);

deps/uv/include/uv/unix.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,10 @@ typedef struct {
328328

329329
#define UV_TIMER_PRIVATE_FIELDS \
330330
uv_timer_cb timer_cb; \
331-
void* heap_node[3]; \
331+
union { \
332+
void* heap[3]; \
333+
struct uv__queue queue; \
334+
} node; \
332335
uint64_t timeout; \
333336
uint64_t repeat; \
334337
uint64_t start_id;

deps/uv/include/uv/version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232

3333
#define UV_VERSION_MAJOR 1
34-
#define UV_VERSION_MINOR 47
34+
#define UV_VERSION_MINOR 48
3535
#define UV_VERSION_PATCH 0
3636
#define UV_VERSION_IS_RELEASE 1
3737
#define UV_VERSION_SUFFIX ""

0 commit comments

Comments
 (0)