From ed71f55a5495dfd9a92035c26b2145f23a27f4d7 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 2 Jul 2019 11:07:43 -0400 Subject: [PATCH] deps: upgrade to libuv 1.30.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This upgrade is a small patch release, fixing compilation errors on Android, Cygwin, and uClibc - none of which are tested in the CI. PR-URL: https://github.com/nodejs/node/pull/28511 Backport-PR-URL: https://github.com/nodejs/node/pull/31969 Reviewed-By: Saúl Ibarra Corretgé Reviewed-By: Richard Lau Reviewed-By: Santiago Gimeno Reviewed-By: Ben Noordhuis --- deps/uv/CMakeLists.txt | 3 +-- deps/uv/ChangeLog | 17 +++++++++++++++++ deps/uv/configure.ac | 2 +- deps/uv/docs/src/threadpool.rst | 2 +- deps/uv/include/uv/version.h | 2 +- deps/uv/src/unix/cygwin.c | 4 ++++ deps/uv/src/unix/thread.c | 18 +++++++++++++----- deps/uv/test/test-tcp-try-write-error.c | 2 +- 8 files changed, 39 insertions(+), 11 deletions(-) diff --git a/deps/uv/CMakeLists.txt b/deps/uv/CMakeLists.txt index f2ed3722c47329..a34e5a1b80a988 100644 --- a/deps/uv/CMakeLists.txt +++ b/deps/uv/CMakeLists.txt @@ -260,8 +260,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Android") src/unix/linux-syscalls.c src/unix/procfs-exepath.c src/unix/pthread-fixes.c - src/unix/sysinfo-loadavg.c - src/unix/sysinfo-memory.c) + src/unix/sysinfo-loadavg.c) endif() if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "Android|Linux|OS/390") diff --git a/deps/uv/ChangeLog b/deps/uv/ChangeLog index b9ed7484a50a32..a6e2786b0ed330 100644 --- a/deps/uv/ChangeLog +++ b/deps/uv/ChangeLog @@ -1,3 +1,20 @@ +2019.07.03, Version 1.30.1 (Stable), 1551969c84c2f546a429dac169c7fdac3e38115e + +Changes since version 1.30.0: + +* doc: fix incorrect versionchanged (cjihrig) + +* test: allow UV_ECONNRESET in tcp_try_write_error (cjihrig) + +* unix: add uv_get_constrained_memory() cygwin stub (cjihrig) + +* build: fix android cmake build (Ben Noordhuis) + +* unix: squelch -Wcast-function-type warning (Ben Noordhuis) + +* build: fix compile error with uClibc (zlargon) + + 2019.06.28, Version 1.30.0 (Stable), 365b6f2a0eacda1ff52be8e57ab9381cfddc5dbb Changes since version 1.29.1: diff --git a/deps/uv/configure.ac b/deps/uv/configure.ac index 626ad4c7b0d975..52aaddcfc150c9 100644 --- a/deps/uv/configure.ac +++ b/deps/uv/configure.ac @@ -13,7 +13,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_PREREQ(2.57) -AC_INIT([libuv], [1.30.0], [https://github.com/libuv/libuv/issues]) +AC_INIT([libuv], [1.30.1], [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]) diff --git a/deps/uv/docs/src/threadpool.rst b/deps/uv/docs/src/threadpool.rst index ed41c37fe327d2..cf6cdc1be0f2c4 100644 --- a/deps/uv/docs/src/threadpool.rst +++ b/deps/uv/docs/src/threadpool.rst @@ -12,7 +12,7 @@ Its default size is 4, but it can be changed at startup time by setting the ``UV_THREADPOOL_SIZE`` environment variable to any value (the absolute maximum is 1024). -.. versionchanged:: 1.29.2 the maximum UV_THREADPOOL_SIZE allowed was increased from 128 to 1024. +.. versionchanged:: 1.30.0 the maximum UV_THREADPOOL_SIZE allowed was increased from 128 to 1024. 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`) diff --git a/deps/uv/include/uv/version.h b/deps/uv/include/uv/version.h index eb1f0c6597eeee..bf992d2d0ee6d8 100644 --- a/deps/uv/include/uv/version.h +++ b/deps/uv/include/uv/version.h @@ -32,7 +32,7 @@ #define UV_VERSION_MAJOR 1 #define UV_VERSION_MINOR 30 -#define UV_VERSION_PATCH 0 +#define UV_VERSION_PATCH 1 #define UV_VERSION_IS_RELEASE 1 #define UV_VERSION_SUFFIX "" diff --git a/deps/uv/src/unix/cygwin.c b/deps/uv/src/unix/cygwin.c index 9da20e203aa238..6b5cfb7ba5b817 100644 --- a/deps/uv/src/unix/cygwin.c +++ b/deps/uv/src/unix/cygwin.c @@ -52,3 +52,7 @@ void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) { (void)cpu_infos; (void)count; } + +uint64_t uv_get_constrained_memory(void) { + return 0; /* Memory constraints are unknown. */ +} diff --git a/deps/uv/src/unix/thread.c b/deps/uv/src/unix/thread.c index cd0b7aa6aaf923..f10c351ebba27a 100644 --- a/deps/uv/src/unix/thread.c +++ b/deps/uv/src/unix/thread.c @@ -37,7 +37,7 @@ #include #endif -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__UCLIBC__) #include /* gnu_get_libc_version() */ #endif @@ -222,6 +222,12 @@ int uv_thread_create_ex(uv_thread_t* tid, size_t pagesize; size_t stack_size; + /* Used to squelch a -Wcast-function-type warning. */ + union { + void (*in)(void*); + void* (*out)(void*); + } f; + stack_size = params->flags & UV_THREAD_HAS_STACK_SIZE ? params->stack_size : 0; @@ -248,7 +254,8 @@ int uv_thread_create_ex(uv_thread_t* tid, abort(); } - err = pthread_create(tid, attr, (void*(*)(void*)) entry, arg); + f.in = entry; + err = pthread_create(tid, attr, f.out, arg); if (attr != NULL) pthread_attr_destroy(attr); @@ -474,7 +481,7 @@ int uv_sem_trywait(uv_sem_t* sem) { #else /* !(defined(__APPLE__) && defined(__MACH__)) */ -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__UCLIBC__) /* Hack around https://sourceware.org/bugzilla/show_bug.cgi?id=12674 * by providing a custom implementation for glibc < 2.21 in terms of other @@ -510,7 +517,8 @@ typedef struct uv_semaphore_s { unsigned int value; } uv_semaphore_t; -#if defined(__GLIBC__) || platform_needs_custom_semaphore +#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || \ + platform_needs_custom_semaphore STATIC_ASSERT(sizeof(uv_sem_t) >= sizeof(uv_semaphore_t*)); #endif @@ -639,7 +647,7 @@ static int uv__sem_trywait(uv_sem_t* sem) { } int uv_sem_init(uv_sem_t* sem, unsigned int value) { -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__UCLIBC__) uv_once(&glibc_version_check_once, glibc_version_check); #endif diff --git a/deps/uv/test/test-tcp-try-write-error.c b/deps/uv/test/test-tcp-try-write-error.c index 58d4723c0903ef..2201d0ea61ad31 100644 --- a/deps/uv/test/test-tcp-try-write-error.c +++ b/deps/uv/test/test-tcp-try-write-error.c @@ -48,7 +48,7 @@ static void incoming_close_cb(uv_handle_t* handle) { while (r > 0) r = uv_try_write((uv_stream_t*) &client, &buf, 1); fprintf(stderr, "uv_try_write error: %d %s\n", r, uv_strerror(r)); - ASSERT(r == UV_EPIPE || r == UV_ECONNABORTED); + ASSERT(r == UV_EPIPE || r == UV_ECONNABORTED || r == UV_ECONNRESET); ASSERT(client.write_queue_size == 0); }