GeezerVison is showing github.com — deps: update c-ares to v1.32.2 · nodejs/node@5eea419
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: deps/cares/CMakeLists.txt +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,7 @@ INCLUDE (CheckCSourceCompiles) | 12 | 12 | INCLUDE (CheckStructHasMember) | 13 | 13 | INCLUDE (CheckLibraryExists) | 14 | 14 |
| 15 | | -PROJECT (c-ares LANGUAGES C VERSION "1.32.1" ) | | 15 | +PROJECT (c-ares LANGUAGES C VERSION "1.32.2" ) | 16 | 16 |
| 17 | 17 | # Set this version before release | 18 | 18 | SET (CARES_VERSION "${PROJECT_VERSION}") | @@ -30,7 +30,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w | 30 | 30 | # For example, a version of 4:0:2 would generate output such as: | 31 | 31 | # libname.so -> libname.so.2 | 32 | 32 | # libname.so.2 -> libname.so.2.2.0 | 33 | | -SET (CARES_LIB_VERSIONINFO "19:1:17") | | 33 | +SET (CARES_LIB_VERSIONINFO "19:2:17") | 34 | 34 |
| 35 | 35 |
| 36 | 36 | OPTION (CARES_STATIC "Build as a static library" OFF) | |
Collapse file Copy file name to clipboardExpand all lines: deps/cares/RELEASE-NOTES.md +24Lines changed: 24 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +## c-ares version 1.32.2 - July 15 2024 | | 2 | + | | 3 | +This is a bugfix release. | | 4 | + | | 5 | +Bugfixes: | | 6 | + | | 7 | +* Windows: rework EventThread AFD code for better stability. | | 8 | + [PR #811](https://github.com/c-ares/c-ares/pull/811) | | 9 | +* Windows: If an IP address was detected to have changed, it could lead to a | | 10 | + crash due to a bad pointer. Regression introduced in 1.31.0. | | 11 | + [59e3a1f4](https://github.com/c-ares/c-ares/commit/59e3a1f4) | | 12 | +* Windows: use `QueryPerformanceCounters()` instead of `GetTickCount64()` for | | 13 | + better time accuracy (~15ms -> ~1us). | | 14 | +* Windows 32bit config change callback needs to be tagged as `stdcall` otherwise | | 15 | + could result in a crash. | | 16 | + [5c2bab35](https://github.com/c-ares/c-ares/commit/5c2bab35) | | 17 | +* Tests that need accurate timing should not depend on internal symbols as there | | 18 | + are C++ equivalents in `std::chrono`. | | 19 | + [PR #809](https://github.com/c-ares/c-ares/pull/809) | | 20 | +* Kqueue (MacOS, \*BSD): If the open socket count exceeded 8 (unlikely), it | | 21 | + would try to allocate a new buffer that was too small. | | 22 | + [5aad7981](https://github.com/c-ares/c-ares/commit/5aad7981) | | 23 | + | | 24 | + | 1 | 25 | ## c-ares version 1.32.1 - July 7 2024 | 2 | 26 |
| 3 | 27 | This is a bugfix release. | |
Collapse file Copy file name to clipboardExpand all lines: deps/cares/aminclude_static.am +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 |
| 2 | 2 | # aminclude_static.am generated automatically by Autoconf | 3 | | -# from AX_AM_MACROS_STATIC on Sun Jul 7 10:45:53 EDT 2024 | | 3 | +# from AX_AM_MACROS_STATIC on Mon Jul 15 09:00:09 EDT 2024 | 4 | 4 |
| 5 | 5 |
| 6 | 6 | # Code coverage | |
Collapse file Copy file name to clipboardExpand all lines: deps/cares/configure +11-11Lines changed: 11 additions & 11 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | #! /bin/sh | 2 | 2 | # Guess values for system-dependent variables and create Makefiles. | 3 | | -# Generated by GNU Autoconf 2.72 for c-ares 1.32.1. | | 3 | +# Generated by GNU Autoconf 2.72 for c-ares 1.32.2. | 4 | 4 | # | 5 | 5 | # Report bugs to <c-ares mailing list: http://lists.haxx.se/listinfo/c-ares>. | 6 | 6 | # | @@ -614,8 +614,8 @@ MAKEFLAGS= | 614 | 614 | # Identity of this package. | 615 | 615 | PACKAGE_NAME='c-ares' | 616 | 616 | PACKAGE_TARNAME='c-ares' | 617 | | -PACKAGE_VERSION='1.32.1' | 618 | | -PACKAGE_STRING='c-ares 1.32.1' | | 617 | +PACKAGE_VERSION='1.32.2' | | 618 | +PACKAGE_STRING='c-ares 1.32.2' | 619 | 619 | PACKAGE_BUGREPORT='c-ares mailing list: http://lists.haxx.se/listinfo/c-ares' | 620 | 620 | PACKAGE_URL='' | 621 | 621 |
| @@ -1415,7 +1415,7 @@ if test "$ac_init_help" = "long"; then | 1415 | 1415 | # Omit some internal or obsolete options to make the list less imposing. | 1416 | 1416 | # This message is too long to be a string in the A/UX 3.1 sh. | 1417 | 1417 | cat <<_ACEOF | 1418 | | -'configure' configures c-ares 1.32.1 to adapt to many kinds of systems. | | 1418 | +'configure' configures c-ares 1.32.2 to adapt to many kinds of systems. | 1419 | 1419 |
| 1420 | 1420 | Usage: $0 [OPTION]... [VAR=VALUE]... | 1421 | 1421 |
| | 1486 | 1486 |
| 1487 | 1487 | if test -n "$ac_init_help"; then | 1488 | 1488 | case $ac_init_help in | 1489 | | - short | recursive ) echo "Configuration of c-ares 1.32.1:";; | | 1489 | + short | recursive ) echo "Configuration of c-ares 1.32.2:";; | 1490 | 1490 | esac | 1491 | 1491 | cat <<\_ACEOF | 1492 | 1492 |
| | 1623 | 1623 | test -n "$ac_init_help" && exit $ac_status | 1624 | 1624 | if $ac_init_version; then | 1625 | 1625 | cat <<\_ACEOF | 1626 | | -c-ares configure 1.32.1 | | 1626 | +c-ares configure 1.32.2 | 1627 | 1627 | generated by GNU Autoconf 2.72 | 1628 | 1628 |
| 1629 | 1629 | Copyright (C) 2023 Free Software Foundation, Inc. | @@ -2267,7 +2267,7 @@ cat >config.log <<_ACEOF | 2267 | 2267 | This file contains any messages produced by compilers while | 2268 | 2268 | running configure, to aid debugging if configure makes a mistake. | 2269 | 2269 |
| 2270 | | -It was created by c-ares $as_me 1.32.1, which was | | 2270 | +It was created by c-ares $as_me 1.32.2, which was | 2271 | 2271 | generated by GNU Autoconf 2.72. Invocation command line was | 2272 | 2272 |
| 2273 | 2273 | $ $0$ac_configure_args_raw | @@ -3259,7 +3259,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu | 3259 | 3259 |
| 3260 | 3260 |
| 3261 | 3261 |
| 3262 | | -CARES_VERSION_INFO="19:1:17" | | 3262 | +CARES_VERSION_INFO="19:2:17" | 3263 | 3263 |
| 3264 | 3264 |
| 3265 | 3265 |
| | 5999 | 5999 |
| 6000 | 6000 | # Define the identity of the package. | 6001 | 6001 | PACKAGE='c-ares' | 6002 | | - VERSION='1.32.1' | | 6002 | + VERSION='1.32.2' | 6003 | 6003 |
| 6004 | 6004 |
| 6005 | 6005 | printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h | @@ -26339,7 +26339,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | 26339 | 26339 | # report actual input values of CONFIG_FILES etc. instead of their | 26340 | 26340 | # values after options handling. | 26341 | 26341 | ac_log=" | 26342 | | -This file was extended by c-ares $as_me 1.32.1, which was | | 26342 | +This file was extended by c-ares $as_me 1.32.2, which was | 26343 | 26343 | generated by GNU Autoconf 2.72. Invocation command line was | 26344 | 26344 |
| 26345 | 26345 | CONFIG_FILES = $CONFIG_FILES | @@ -26407,7 +26407,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ | 26407 | 26407 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | 26408 | 26408 | ac_cs_config='$ac_cs_config_escaped' | 26409 | 26409 | ac_cs_version="\\ | 26410 | | -c-ares config.status 1.32.1 | | 26410 | +c-ares config.status 1.32.2 | 26411 | 26411 | configured by $0, generated by GNU Autoconf 2.72, | 26412 | 26412 | with options \\"\$ac_cs_config\\" | 26413 | 26413 |
| |
Collapse file Copy file name to clipboardExpand all lines: deps/cares/configure.ac +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -2,10 +2,10 @@ dnl Copyright (C) The c-ares project and its contributors | 2 | 2 | dnl SPDX-License-Identifier: MIT | 3 | 3 | AC_PREREQ([2.69]) | 4 | 4 |
| 5 | | -AC_INIT([c-ares], [1.32.1], | | 5 | +AC_INIT([c-ares], [1.32.2], | 6 | 6 | [c-ares mailing list: http://lists.haxx.se/listinfo/c-ares]) | 7 | 7 |
| 8 | | -CARES_VERSION_INFO="19:1:17" | | 8 | +CARES_VERSION_INFO="19:2:17" | 9 | 9 | dnl This flag accepts an argument of the form current[:revision[:age]]. So, | 10 | 10 | dnl passing -version-info 3:12:1 sets current to 3, revision to 12, and age to | 11 | 11 | dnl 1. | |
Collapse file Copy file name to clipboardExpand all lines: deps/cares/include/ares_version.h +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 32 | 32 |
| 33 | 33 | #define ARES_VERSION_MAJOR 1 | 34 | 34 | #define ARES_VERSION_MINOR 32 | 35 | | -#define ARES_VERSION_PATCH 1 | | 35 | +#define ARES_VERSION_PATCH 2 | 36 | 36 | #define ARES_VERSION \ | 37 | 37 | ((ARES_VERSION_MAJOR << 16) | (ARES_VERSION_MINOR << 8) | \ | 38 | 38 | (ARES_VERSION_PATCH)) | 39 | | -#define ARES_VERSION_STR "1.32.1" | | 39 | +#define ARES_VERSION_STR "1.32.2" | 40 | 40 |
| 41 | 41 | #define CARES_HAVE_ARES_LIBRARY_INIT 1 | 42 | 42 | #define CARES_HAVE_ARES_LIBRARY_CLEANUP 1 | |
Collapse file Copy file name to clipboardExpand all lines: deps/cares/src/lib/Makefile.in +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 15 | 15 | @SET_MAKE@ | 16 | 16 |
| 17 | 17 | # aminclude_static.am generated automatically by Autoconf | 18 | | -# from AX_AM_MACROS_STATIC on Sun Jul 7 10:45:53 EDT 2024 | | 18 | +# from AX_AM_MACROS_STATIC on Mon Jul 15 09:00:09 EDT 2024 | 19 | 19 |
| 20 | 20 | # Copyright (C) The c-ares project and its contributors | 21 | 21 | # SPDX-License-Identifier: MIT | |
Collapse file Copy file name to clipboardExpand all lines: deps/cares/src/lib/ares__timeval.c +17-4Lines changed: 17 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 30 | 30 |
| 31 | 31 | void ares__tvnow(ares_timeval_t *now) | 32 | 32 | { | 33 | | - /* GetTickCount64() is available on Windows Vista and higher */ | 34 | | - ULONGLONG milliseconds = GetTickCount64(); | | 33 | + /* QueryPerformanceCounters() has been around since Windows 2000, though | | 34 | + * significant fixes were made in later versions. Documentation states | | 35 | + * 1 microsecond or better resolution with a rollover not less than 100 years. | | 36 | + * This differs from GetTickCount{64}() which has a resolution between 10 and | | 37 | + * 16 ms. */ | | 38 | + LARGE_INTEGER freq; | | 39 | + LARGE_INTEGER current; | 35 | 40 |
| 36 | | - now->sec = (ares_int64_t)milliseconds / 1000; | 37 | | - now->usec = (unsigned int)(milliseconds % 1000) * 1000; | | 41 | + /* Not sure how long it takes to get the frequency, I see it recommended to | | 42 | + * cache it */ | | 43 | + QueryPerformanceFrequency(&freq); | | 44 | + QueryPerformanceCounter(¤t); | | 45 | + | | 46 | + now->sec = current.QuadPart / freq.QuadPart; | | 47 | + /* We want to prevent overflows so we get the remainder, then multiply to | | 48 | + * microseconds before dividing */ | | 49 | + now->usec = (unsigned int)(((current.QuadPart % freq.QuadPart) * 1000000) / | | 50 | + freq.QuadPart); | 38 | 51 | } | 39 | 52 |
| 40 | 53 | #elif defined(HAVE_CLOCK_GETTIME_MONOTONIC) | |
Collapse file Copy file name to clipboardExpand all lines: deps/cares/src/lib/ares_destroy.c +15-3Lines changed: 15 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -38,7 +38,17 @@ void ares_destroy(ares_channel_t *channel) | 38 | 38 | return; | 39 | 39 | } | 40 | 40 |
| 41 | | - /* Disable configuration change monitoring */ | | 41 | + /* Mark as being shutdown */ | | 42 | + ares__channel_lock(channel); | | 43 | + channel->sys_up = ARES_FALSE; | | 44 | + ares__channel_unlock(channel); | | 45 | + | | 46 | + /* Disable configuration change monitoring. We can't hold a lock because | | 47 | + * some cleanup routines, such as on Windows, are synchronous operations. | | 48 | + * What we've observed is a system config change event was triggered right | | 49 | + * at shutdown time and it tries to take the channel lock and the destruction | | 50 | + * waits for that event to complete before it continues so we get a channel | | 51 | + * lock deadlock at shutdown if we hold a lock during this process. */ | 42 | 52 | if (channel->optmask & ARES_OPT_EVENT_THREAD) { | 43 | 53 | ares_event_thread_t *e = channel->sock_state_cb_data; | 44 | 54 | if (e && e->configchg) { | @@ -47,14 +57,16 @@ void ares_destroy(ares_channel_t *channel) | 47 | 57 | } | 48 | 58 | } | 49 | 59 |
| 50 | | - /* Wait for reinit thread to exit if there was one pending */ | | 60 | + /* Wait for reinit thread to exit if there was one pending, can't be | | 61 | + * holding a lock as the thread may take locks. */ | 51 | 62 | if (channel->reinit_thread != NULL) { | 52 | 63 | void *rv; | 53 | 64 | ares__thread_join(channel->reinit_thread, &rv); | 54 | 65 | channel->reinit_thread = NULL; | 55 | 66 | } | 56 | 67 |
| 57 | | - /* Lock because callbacks will be triggered */ | | 68 | + /* Lock because callbacks will be triggered, and any system-generated | | 69 | + * callbacks need to hold a channel lock. */ | 58 | 70 | ares__channel_lock(channel); | 59 | 71 |
| 60 | 72 | /* Destroy all queries */ | |
Collapse file Copy file name to clipboardExpand all lines: deps/cares/src/lib/ares_event_configchg.c +6-5Lines changed: 6 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -237,9 +237,10 @@ void ares_event_configchg_destroy(ares_event_configchg_t *configchg) | 237 | 237 |
| 238 | 238 |
| 239 | 239 | # ifndef __WATCOMC__ | 240 | | -static void ares_event_configchg_ip_cb(PVOID CallerContext, | 241 | | - PMIB_IPINTERFACE_ROW Row, | 242 | | - MIB_NOTIFICATION_TYPE NotificationType) | | 240 | +static void NETIOAPI_API_ | | 241 | + ares_event_configchg_ip_cb(PVOID CallerContext, | | 242 | + PMIB_IPINTERFACE_ROW Row, | | 243 | + MIB_NOTIFICATION_TYPE NotificationType) | 243 | 244 | { | 244 | 245 | ares_event_configchg_t *configchg = CallerContext; | 245 | 246 | (void)Row; | @@ -303,8 +304,8 @@ ares_status_t ares_event_configchg_init(ares_event_configchg_t **configchg, | 303 | 304 | * that didn't get triggered either. | 304 | 305 | */ | 305 | 306 | if (NotifyIpInterfaceChange( | 306 | | - AF_UNSPEC, (PIPINTERFACE_CHANGE_CALLBACK)ares_event_configchg_ip_cb, | 307 | | - *configchg, FALSE, &c->ifchg_hnd) != NO_ERROR) { | | 307 | + AF_UNSPEC, ares_event_configchg_ip_cb, | | 308 | + c, FALSE, &c->ifchg_hnd) != NO_ERROR) { | 308 | 309 | status = ARES_ESERVFAIL; | 309 | 310 | goto done; | 310 | 311 | } | |
|