diff --git a/deps/cares/CMakeLists.txt b/deps/cares/CMakeLists.txt index d3da9afc75b27b..9930566a70b106 100644 --- a/deps/cares/CMakeLists.txt +++ b/deps/cares/CMakeLists.txt @@ -12,7 +12,7 @@ INCLUDE (CheckCSourceCompiles) INCLUDE (CheckStructHasMember) INCLUDE (CheckLibraryExists) -PROJECT (c-ares LANGUAGES C VERSION "1.32.0" ) +PROJECT (c-ares LANGUAGES C VERSION "1.32.1" ) # Set this version before release SET (CARES_VERSION "${PROJECT_VERSION}") @@ -30,7 +30,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w # For example, a version of 4:0:2 would generate output such as: # libname.so -> libname.so.2 # libname.so.2 -> libname.so.2.2.0 -SET (CARES_LIB_VERSIONINFO "19:0:17") +SET (CARES_LIB_VERSIONINFO "19:1:17") OPTION (CARES_STATIC "Build as a static library" OFF) diff --git a/deps/cares/RELEASE-NOTES.md b/deps/cares/RELEASE-NOTES.md index 545e3ca82746fa..e016cc5097cf66 100644 --- a/deps/cares/RELEASE-NOTES.md +++ b/deps/cares/RELEASE-NOTES.md @@ -1,3 +1,13 @@ +## c-ares version 1.32.1 - July 7 2024 + +This is a bugfix release. + +Bugfixes: +* Channel lock needs to be recursive to ensure calls into c-ares functions can + be made from callbacks otherwise deadlocks will occur. This regression was + introduced in 1.32.0. + + ## c-ares version 1.32.0 - July 4 2024 This is a feature and bugfix release. diff --git a/deps/cares/aminclude_static.am b/deps/cares/aminclude_static.am index 7c89a366f80780..5eeeffd3349cb6 100644 --- a/deps/cares/aminclude_static.am +++ b/deps/cares/aminclude_static.am @@ -1,6 +1,6 @@ # aminclude_static.am generated automatically by Autoconf -# from AX_AM_MACROS_STATIC on Thu Jul 4 07:03:12 EDT 2024 +# from AX_AM_MACROS_STATIC on Sun Jul 7 10:45:53 EDT 2024 # Code coverage diff --git a/deps/cares/configure b/deps/cares/configure index a309badc242b7b..34e67aaf6aef87 100755 --- a/deps/cares/configure +++ b/deps/cares/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for c-ares 1.32.0. +# Generated by GNU Autoconf 2.72 for c-ares 1.32.1. # # Report bugs to . # @@ -614,8 +614,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='c-ares' PACKAGE_TARNAME='c-ares' -PACKAGE_VERSION='1.32.0' -PACKAGE_STRING='c-ares 1.32.0' +PACKAGE_VERSION='1.32.1' +PACKAGE_STRING='c-ares 1.32.1' PACKAGE_BUGREPORT='c-ares mailing list: http://lists.haxx.se/listinfo/c-ares' PACKAGE_URL='' @@ -1415,7 +1415,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures c-ares 1.32.0 to adapt to many kinds of systems. +'configure' configures c-ares 1.32.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1486,7 +1486,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of c-ares 1.32.0:";; + short | recursive ) echo "Configuration of c-ares 1.32.1:";; esac cat <<\_ACEOF @@ -1623,7 +1623,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -c-ares configure 1.32.0 +c-ares configure 1.32.1 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -2267,7 +2267,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by c-ares $as_me 1.32.0, which was +It was created by c-ares $as_me 1.32.1, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -3259,7 +3259,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -CARES_VERSION_INFO="19:0:17" +CARES_VERSION_INFO="19:1:17" @@ -5999,7 +5999,7 @@ fi # Define the identity of the package. PACKAGE='c-ares' - VERSION='1.32.0' + VERSION='1.32.1' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -26339,7 +26339,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by c-ares $as_me 1.32.0, which was +This file was extended by c-ares $as_me 1.32.1, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -26407,7 +26407,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -c-ares config.status 1.32.0 +c-ares config.status 1.32.1 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff --git a/deps/cares/configure.ac b/deps/cares/configure.ac index d7deb430f8a2dd..d7a2cc43008bbc 100644 --- a/deps/cares/configure.ac +++ b/deps/cares/configure.ac @@ -2,10 +2,10 @@ dnl Copyright (C) The c-ares project and its contributors dnl SPDX-License-Identifier: MIT AC_PREREQ([2.69]) -AC_INIT([c-ares], [1.32.0], +AC_INIT([c-ares], [1.32.1], [c-ares mailing list: http://lists.haxx.se/listinfo/c-ares]) -CARES_VERSION_INFO="19:0:17" +CARES_VERSION_INFO="19:1:17" dnl This flag accepts an argument of the form current[:revision[:age]]. So, dnl passing -version-info 3:12:1 sets current to 3, revision to 12, and age to dnl 1. diff --git a/deps/cares/include/ares_version.h b/deps/cares/include/ares_version.h index 7374767e98fce5..07cd989a386ae7 100644 --- a/deps/cares/include/ares_version.h +++ b/deps/cares/include/ares_version.h @@ -32,11 +32,11 @@ #define ARES_VERSION_MAJOR 1 #define ARES_VERSION_MINOR 32 -#define ARES_VERSION_PATCH 0 +#define ARES_VERSION_PATCH 1 #define ARES_VERSION \ ((ARES_VERSION_MAJOR << 16) | (ARES_VERSION_MINOR << 8) | \ (ARES_VERSION_PATCH)) -#define ARES_VERSION_STR "1.32.0" +#define ARES_VERSION_STR "1.32.1" #define CARES_HAVE_ARES_LIBRARY_INIT 1 #define CARES_HAVE_ARES_LIBRARY_CLEANUP 1 diff --git a/deps/cares/src/lib/Makefile.in b/deps/cares/src/lib/Makefile.in index 38e278a6d304a7..55853a8ebd1ac5 100644 --- a/deps/cares/src/lib/Makefile.in +++ b/deps/cares/src/lib/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # aminclude_static.am generated automatically by Autoconf -# from AX_AM_MACROS_STATIC on Thu Jul 4 07:03:12 EDT 2024 +# from AX_AM_MACROS_STATIC on Sun Jul 7 10:45:53 EDT 2024 # Copyright (C) The c-ares project and its contributors # SPDX-License-Identifier: MIT diff --git a/deps/cares/src/lib/ares__threads.c b/deps/cares/src/lib/ares__threads.c index ae3a66cc31bee6..b47544451d9d4f 100644 --- a/deps/cares/src/lib/ares__threads.c +++ b/deps/cares/src/lib/ares__threads.c @@ -217,19 +217,31 @@ struct ares__thread_mutex { ares__thread_mutex_t *ares__thread_mutex_create(void) { + pthread_mutexattr_t attr; ares__thread_mutex_t *mut = ares_malloc_zero(sizeof(*mut)); if (mut == NULL) { return NULL; } - if (pthread_mutex_init(&mut->mutex, NULL) != 0) { + if (pthread_mutexattr_init(&attr) != 0) { + ares_free(mut); /* LCOV_EXCL_LINE: UntestablePath */ + return NULL; /* LCOV_EXCL_LINE: UntestablePath */ + } + + if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) != 0) { + goto fail; /* LCOV_EXCL_LINE: UntestablePath */ + } + + if (pthread_mutex_init(&mut->mutex, &attr) != 0) { goto fail; /* LCOV_EXCL_LINE: UntestablePath */ } + pthread_mutexattr_destroy(&attr); return mut; /* LCOV_EXCL_START: UntestablePath */ fail: + pthread_mutexattr_destroy(&attr); ares_free(mut); return NULL; /* LCOV_EXCL_STOP */