Skip to content

Commit

Permalink
deps: update libuv to 1.50.0
Browse files Browse the repository at this point in the history
PR-URL: #56616
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
nodejs-github-bot authored and aduh95 committed Jan 30, 2025
1 parent d83d89a commit 9ffe3ad
Show file tree
Hide file tree
Showing 58 changed files with 1,582 additions and 567 deletions.
1 change: 1 addition & 0 deletions deps/uv/.mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ San-Tai Hsu <[email protected]>
Santiago Gimeno <[email protected]> <[email protected]>
Saúl Ibarra Corretgé <[email protected]>
Saúl Ibarra Corretgé <[email protected]> <[email protected]>
Saúl Ibarra Corretgé <[email protected]> <[email protected]>
Shigeki Ohtsu <[email protected]> <[email protected]>
Shuowang (Wayne) Zhang <[email protected]>
TK-one <[email protected]>
Expand Down
4 changes: 3 additions & 1 deletion deps/uv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -588,5 +588,7 @@ Raihaan Shouhell <[email protected]>
Rialbat <[email protected]>
Adam <[email protected]>
Poul T Lomholt <[email protected]>
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Thad House <[email protected]>
Julian A Avar C <[email protected]>
amcgoogan <[email protected]>
Rafael Gonzaga <[email protected]>
5 changes: 3 additions & 2 deletions deps/uv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.10)

if(POLICY CMP0091)
cmake_policy(SET CMP0091 NEW) # Enable MSVC_RUNTIME_LIBRARY setting
Expand Down Expand Up @@ -186,7 +186,7 @@ set(uv_sources
src/version.c)

if(WIN32)
list(APPEND uv_defines WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0602 _CRT_DECLARE_NONSTDC_NAMES=0)
list(APPEND uv_defines WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0A00 _CRT_DECLARE_NONSTDC_NAMES=0)
list(APPEND uv_libraries
psapi
user32
Expand Down Expand Up @@ -667,6 +667,7 @@ if(LIBUV_BUILD_TESTS)
test/test-thread-affinity.c
test/test-thread-equal.c
test/test-thread.c
test/test-thread-name.c
test/test-thread-priority.c
test/test-threadpool-cancel.c
test/test-threadpool.c
Expand Down
83 changes: 82 additions & 1 deletion deps/uv/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,85 @@
2024.10.18, Version 1.49.2 (Stable)
2025.01.15, Version 1.50.0 (Stable)

Changes since version 1.49.2:

* ci: run macOS and iOS tests also on macOS 14 (Saúl Ibarra Corretgé)

* unix,win: map ENOEXEC errno (Saúl Ibarra Corretgé)

* test: skip multicast join test on ENOEXEC (Saúl Ibarra Corretgé)

* ci: make sure the macOS firewall is disabled (Saúl Ibarra Corretgé)

* darwin,test: squelch EBUSY error on multicast join (Saúl Ibarra Corretgé)

* build: update minimum cmake to 3.10 (Ben Noordhuis)

* kqueue: use EVFILT_USER for async if available (Jameson Nash)

* unix,win: fix off-by-one in uv_wtf8_to_utf16() (Ben Noordhuis)

* doc: add scala-native-loop to LINKS.md (Julian A Avar C)

* unix: fix build breakage on haiku, openbsd, etc (Jeffrey H. Johnson)

* kqueue: lower overhead in uv__io_check_fd (Andy Pan)

* doc: move cjihrig back to active maintainers (cjihrig)

* build(deps): bump actions/checkout from 3 to 4 (dependabot[bot])

* unix,pipe: fix handling null buffer in uv_pipe_get{sock,peer}name (Saúl
Ibarra Corretgé)

* unix,win: harmonize buffer checking (Saúl Ibarra Corretgé)

* unix,win: add support for detached threads (Juan José Arboleda)

* src: add uv_thread_set/getname() methods (Santiago Gimeno)

* build: fix qemu builds (Ben Noordhuis)

* win: drop support for windows 8 (Ben Noordhuis)

* linux: fix uv_cpu_info() arm cpu model detection (Ben Noordhuis)

* linux: always use io_uring for epoll batching (Ben Noordhuis)

* doc: clarify repeating timer behavior more (Ben Noordhuis)

* unix,win: handle nbufs=0 in uv_udp_try_send (Ben Noordhuis)

* win: use GetQueuedCompletionStatusEx directly (Saúl Ibarra Corretgé)

* win: enable uv_thread_{get,set}name on MinGW (Saúl Ibarra Corretgé)

* win: drop support for the legacy MinGW (Saúl Ibarra Corretgé)

* win,fs: get (most) fstat when no permission (Jameson Nash)

* win: plug uv_fs_event_start memory leak (amcgoogan)

* test: address FreeBSD kernel bug causing NULL path in fsevents (Juan José
Arboleda)

* unix: refactor udp sendmsg code (Ben Noordhuis)

* unix,win: add uv_udp_try_send2 (Ben Noordhuis)

* test: fix flaky flaky udp_mmsg test (Juan José Arboleda)

* build: enable fdsan in Android (Juan José Arboleda)

* test: fix udp-multicast-join for FreeBSD (Juan José Arboleda)

* win: fix leak processing fs event (Saúl Ibarra Corretgé)

* src: set a default thread name for workers (Rafael Gonzaga)

* misc: implement uv_getrusage_thread (Juan José Arboleda)


2024.10.18, Version 1.49.2 (Stable), e1095c7a4373ce00cd8874d8e820de5afb25776e

Changes since version 1.49.1:

Expand Down
1 change: 1 addition & 0 deletions deps/uv/LINKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* [Pixie-io](https://github.com/pixie-io/pixie): Open-source observability tool for Kubernetes applications.
* [potion](https://github.com/perl11/potion)/[p2](https://github.com/perl11/p2): runtime
* [racer](https://libraries.io/rubygems/racer): Ruby web server written as an C extension
* [scala-native-loop](https://github.com/scala-native/scala-native-loop): Extensible event loop and async-oriented IO for Scala Native; powered by libuv
* [Socket Runtime](https://sockets.sh): A runtime for creating native cross-platform software on mobile and desktop using HTML, CSS, and JavaScript
* [spider-gazelle](https://github.com/cotag/spider-gazelle): Ruby web server using libuv bindings
* [Suave](http://suave.io/): A simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition
Expand Down
6 changes: 3 additions & 3 deletions deps/uv/MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ libuv is currently managed by the following individuals:

* **Ben Noordhuis** ([@bnoordhuis](https://github.com/bnoordhuis))
- GPG key: D77B 1E34 243F BAF0 5F8E 9CC3 4F55 C8C8 46AB 89B9 (pubkey-bnoordhuis)
* **Colin Ihrig** ([@cjihrig](https://github.com/cjihrig))
- GPG key: 94AE 3667 5C46 4D64 BAFA 68DD 7434 390B DBE9 B9C5 (pubkey-cjihrig)
- GPG key: 5735 3E0D BDAA A7E8 39B6 6A1A FF47 D5E4 AD8B 4FDC (pubkey-cjihrig-kb)
* **Jameson Nash** ([@vtjnash](https://github.com/vtjnash))
- GPG key: AEAD 0A4B 6867 6775 1A0E 4AEF 34A2 5FB1 2824 6514 (pubkey-vtjnash)
- GPG key: CFBB 9CA9 A5BE AFD7 0E2B 3C5A 79A6 7C55 A367 9C8B (pubkey2022-vtjnash)
Expand All @@ -24,9 +27,6 @@ libuv is currently managed by the following individuals:
* **Anna Henningsen** ([@addaleax](https://github.com/addaleax))
* **Bartosz Sosnowski** ([@bzoz](https://github.com/bzoz))
* **Bert Belder** ([@piscisaureus](https://github.com/piscisaureus))
* **Colin Ihrig** ([@cjihrig](https://github.com/cjihrig))
- GPG key: 94AE 3667 5C46 4D64 BAFA 68DD 7434 390B DBE9 B9C5 (pubkey-cjihrig)
- GPG key: 5735 3E0D BDAA A7E8 39B6 6A1A FF47 D5E4 AD8B 4FDC (pubkey-cjihrig-kb)
* **Fedor Indutny** ([@indutny](https://github.com/indutny))
- GPG key: AF2E EA41 EC34 47BF DD86 FED9 D706 3CCE 19B7 E890 (pubkey-indutny)
* **Imran Iqbal** ([@imran-iq](https://github.com/imran-iq))
Expand Down
3 changes: 2 additions & 1 deletion deps/uv/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if WINNT
uvinclude_HEADERS += include/uv/win.h include/uv/tree.h
AM_CPPFLAGS += -I$(top_srcdir)/src/win \
-DWIN32_LEAN_AND_MEAN \
-D_WIN32_WINNT=0x0602
-D_WIN32_WINNT=0x0A00
libuv_la_SOURCES += src/win/async.c \
src/win/atomicops-inl.h \
src/win/core.c \
Expand Down Expand Up @@ -294,6 +294,7 @@ test_run_tests_SOURCES = test/blackhole-server.c \
test/test-thread-equal.c \
test/test-thread.c \
test/test-thread-affinity.c \
test/test-thread-name.c \
test/test-thread-priority.c \
test/test-threadpool-cancel.c \
test/test-threadpool.c \
Expand Down
4 changes: 2 additions & 2 deletions deps/uv/SUPPORTED_PLATFORMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
|---|---|---|---|
| GNU/Linux | Tier 1 | Linux >= 3.10 with glibc >= 2.17 | |
| macOS | Tier 1 | macOS >= 11 | Currently supported macOS releases |
| Windows | Tier 1 | >= Windows 8 | VS 2015 and later are supported |
| Windows | Tier 1 | >= Windows 10 | VS 2015 and later are supported |
| FreeBSD | Tier 2 | >= 12 | |
| AIX | Tier 2 | >= 6 | Maintainers: @libuv/aix |
| IBM i | Tier 2 | >= IBM i 7.2 | Maintainers: @libuv/ibmi |
| z/OS | Tier 2 | >= V2R2 | Maintainers: @libuv/zos |
| Linux with musl | Tier 2 | musl >= 1.0 | |
| Android | Tier 3 | NDK >= r15b | Android 7.0, `-DANDROID_PLATFORM=android-24` |
| MinGW | Tier 3 | MinGW32 and MinGW-w64 | |
| MinGW | Tier 3 | MinGW-w64 | |
| SunOS | Tier 3 | Solaris 121 and later | |
| Other | Tier 3 | N/A | |

Expand Down
2 changes: 1 addition & 1 deletion deps/uv/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

AC_PREREQ(2.57)
AC_INIT([libuv], [1.49.2], [https://github.com/libuv/libuv/issues])
AC_INIT([libuv], [1.50.0], [https://github.com/libuv/libuv/issues])
AC_CONFIG_MACRO_DIR([m4])
m4_include([m4/libuv-extra-automake-flags.m4])
m4_include([m4/as_case.m4])
Expand Down
5 changes: 5 additions & 0 deletions deps/uv/docs/src/fs_event.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ Data types

The `events` parameter is an ORed mask of :c:enum:`uv_fs_event` elements.

.. note::
For FreeBSD path could sometimes be `NULL` due to a kernel bug.

.. _Reference: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197695

.. c:enum:: uv_fs_event
Event types that :c:type:`uv_fs_event_t` handles monitor.
Expand Down
11 changes: 11 additions & 0 deletions deps/uv/docs/src/misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,17 @@ API
On Windows not all fields are set, the unsupported fields are filled with zeroes.
See :c:type:`uv_rusage_t` for more details.
.. c:function:: int uv_getrusage_thread(uv_rusage_t* rusage)
Gets the resource usage measures for the calling thread.
.. versionadded:: 1.50.0
.. note::
Not supported on all platforms. May return `UV_ENOTSUP`.
On macOS and Windows not all fields are set, the unsupported fields are filled with zeroes.
See :c:type:`uv_rusage_t` for more details.
.. c:function:: uv_pid_t uv_os_getpid(void)
Returns the current process ID.
Expand Down
25 changes: 25 additions & 0 deletions deps/uv/docs/src/threading.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ Threads
.. versionchanged:: 1.4.1 returns a UV_E* error code on failure
.. c:function:: int uv_thread_detach(uv_thread_t* tid)
Detaches a thread. Detached threads automatically release their
resources upon termination, eliminating the need for the application to
call `uv_thread_join`.
.. versionadded:: 1.50.0
.. c:function:: int uv_thread_create_ex(uv_thread_t* tid, const uv_thread_options_t* params, uv_thread_cb entry, void* arg)
Like :c:func:`uv_thread_create`, but additionally specifies options for creating a new thread.
Expand Down Expand Up @@ -132,6 +140,23 @@ Threads
.. c:function:: int uv_thread_join(uv_thread_t *tid)
.. c:function:: int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2)
.. c:function:: int uv_thread_setname(const char* name)
Sets the name of the current thread. Different platforms define different limits on the max number of characters
a thread name can be: Linux, IBM i (16), macOS (64), Windows (32767), and NetBSD (32), etc. `uv_thread_setname()`
will truncate it in case `name` is larger than the limit of the platform.
.. versionadded:: 1.50.0
.. c:function:: int uv_thread_getname(uv_thread_t* tid, char* name, size_t* size)
Gets the name of the thread specified by `tid`. The thread name is copied, with the trailing NUL, into the buffer
pointed to by `name`. The `size` parameter specifies the size of the buffer pointed to by `name`.
The buffer should be large enough to hold the name of the thread plus the trailing NUL, or it will be truncated to fit
with the trailing NUL.
.. versionadded:: 1.50.0
.. c:function:: int uv_thread_setpriority(uv_thread_t tid, int priority)
If the function succeeds, the return value is 0.
If the function fails, the return value is less than zero.
Expand Down
2 changes: 2 additions & 0 deletions deps/uv/docs/src/threadpool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ is 1024).
.. versionchanged:: 1.45.0 threads now have an 8 MB stack instead of the
(sometimes too low) platform default.

.. versionchanged:: 1.50.0 threads now have a default name of libuv-worker.

The threadpool is global and shared across all event loops. When a particular
function makes use of the threadpool (i.e. when using :c:func:`uv_queue_work`)
libuv preallocates and initializes the maximum number of threads allowed by
Expand Down
14 changes: 9 additions & 5 deletions deps/uv/docs/src/timer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@

Timer handles are used to schedule callbacks to be called in the future.

Timers are either single-shot or repeating. Repeating timers do not adjust
for overhead but are rearmed relative to the event loop's idea of "now".

Libuv updates its idea of "now" right before executing timer callbacks, and
right after waking up from waiting for I/O. See also :c:func:`uv_update_time`.

Example: a repeating timer with a 50 ms interval whose callback takes 17 ms
to complete, runs again 33 ms later. If other tasks take longer than 33 ms,
the timer callback runs as soon as possible.

Data types
----------
Expand Down Expand Up @@ -64,11 +73,6 @@ API
duration, and will follow normal timer semantics in the case of a
time-slice overrun.
For example, if a 50ms repeating timer first runs for 17ms, it will be
scheduled to run again 33ms later. If other tasks consume more than the
33ms following the first timer callback, then the callback will run as soon
as possible.
.. note::
If the repeat value is set from a timer callback it does not immediately take effect.
If the timer was non-repeating before, it will have been stopped. If it was repeating,
Expand Down
14 changes: 14 additions & 0 deletions deps/uv/docs/src/udp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,20 @@ API
.. versionchanged:: 1.27.0 added support for connected sockets
.. c:function:: int uv_udp_try_send2(uv_udp_t* handle, unsigned int count, uv_buf_t* bufs[/*count*/], unsigned int nbufs[/*count*/], struct sockaddr* addrs[/*count*/], unsigned int flags)
Like :c:func:`uv_udp_try_send`, but can send multiple datagrams.
Lightweight abstraction around :man:`sendmmsg(2)`, with a :man:`sendmsg(2)`
fallback loop for platforms that do not support the former. The handle must
be fully initialized; call c:func:`uv_udp_bind` first.
:returns: >= 0: number of datagrams sent. Zero only if `count` was zero.
< 0: negative error code. Only if sending the first datagram fails,
otherwise returns a positive send count. ``UV_EAGAIN`` when datagrams
cannot be sent right now; fall back to :c:func:`uv_udp_send`.

.. versionadded:: 1.50.0

.. c:function:: int uv_udp_recv_start(uv_udp_t* handle, uv_alloc_cb alloc_cb, uv_udp_recv_cb recv_cb)
Prepare for receiving data. If the socket has not previously been bound
Expand Down
12 changes: 12 additions & 0 deletions deps/uv/include/uv.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ struct uv__queue {
XX(ESOCKTNOSUPPORT, "socket type not supported") \
XX(ENODATA, "no data available") \
XX(EUNATCH, "protocol driver not attached") \
XX(ENOEXEC, "exec format error") \

#define UV_HANDLE_TYPE_MAP(XX) \
XX(ASYNC, async) \
Expand Down Expand Up @@ -775,6 +776,12 @@ UV_EXTERN int uv_udp_try_send(uv_udp_t* handle,
const uv_buf_t bufs[],
unsigned int nbufs,
const struct sockaddr* addr);
UV_EXTERN int uv_udp_try_send2(uv_udp_t* handle,
unsigned int count,
uv_buf_t* bufs[/*count*/],
unsigned int nbufs[/*count*/],
struct sockaddr* addrs[/*count*/],
unsigned int flags);
UV_EXTERN int uv_udp_recv_start(uv_udp_t* handle,
uv_alloc_cb alloc_cb,
uv_udp_recv_cb recv_cb);
Expand Down Expand Up @@ -1288,6 +1295,7 @@ typedef struct {
} uv_rusage_t;

UV_EXTERN int uv_getrusage(uv_rusage_t* rusage);
UV_EXTERN int uv_getrusage_thread(uv_rusage_t* rusage);

UV_EXTERN int uv_os_homedir(char* buffer, size_t* size);
UV_EXTERN int uv_os_tmpdir(char* buffer, size_t* size);
Expand Down Expand Up @@ -1869,6 +1877,7 @@ UV_EXTERN int uv_gettimeofday(uv_timeval64_t* tv);
typedef void (*uv_thread_cb)(void* arg);

UV_EXTERN int uv_thread_create(uv_thread_t* tid, uv_thread_cb entry, void* arg);
UV_EXTERN int uv_thread_detach(uv_thread_t* tid);

typedef enum {
UV_THREAD_NO_FLAGS = 0x00,
Expand Down Expand Up @@ -1898,6 +1907,9 @@ UV_EXTERN int uv_thread_getcpu(void);
UV_EXTERN uv_thread_t uv_thread_self(void);
UV_EXTERN int uv_thread_join(uv_thread_t *tid);
UV_EXTERN int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2);
UV_EXTERN int uv_thread_setname(const char* name);
UV_EXTERN int uv_thread_getname(uv_thread_t* tid, char* name, size_t size);


/* The presence of these unions force similar struct layout. */
#define XX(_, name) uv_ ## name ## _t name;
Expand Down
6 changes: 6 additions & 0 deletions deps/uv/include/uv/errno.h
Original file line number Diff line number Diff line change
Expand Up @@ -474,4 +474,10 @@
# define UV__EUNATCH (-4023)
#endif

#if defined(ENOEXEC) && !defined(_WIN32)
# define UV__ENOEXEC UV__ERR(ENOEXEC)
#else
# define UV__ENOEXEC (-4022)
#endif

#endif /* UV_ERRNO_H_ */
5 changes: 4 additions & 1 deletion deps/uv/include/uv/unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,10 @@ typedef struct {

#define UV_UDP_SEND_PRIVATE_FIELDS \
struct uv__queue queue; \
struct sockaddr_storage addr; \
union { \
struct sockaddr addr; \
struct sockaddr_storage storage; \
} u; \
unsigned int nbufs; \
uv_buf_t* bufs; \
ssize_t status; \
Expand Down
Loading

0 comments on commit 9ffe3ad

Please sign in to comment.