Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update c-ares to 1.22.0 #50444

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
437 changes: 247 additions & 190 deletions deps/cares/CHANGES

Large diffs are not rendered by default.

28 changes: 24 additions & 4 deletions deps/cares/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
CMAKE_MINIMUM_REQUIRED (VERSION 3.1.0)
CMAKE_MINIMUM_REQUIRED (VERSION 3.5.0)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")

INCLUDE (CheckIncludeFiles)
INCLUDE (CheckTypeSize)
Expand All @@ -10,10 +12,12 @@ INCLUDE (CheckCSourceCompiles)
INCLUDE (CheckStructHasMember)
INCLUDE (CheckLibraryExists)

PROJECT (c-ares LANGUAGES C VERSION "1.20.1" )
PROJECT (c-ares LANGUAGES C VERSION "1.21.0" )

INCLUDE (EnableWarnings)

# Set this version before release
SET (CARES_VERSION "1.20.1")
SET (CARES_VERSION "1.21.0")

INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are wrong.

Expand All @@ -28,7 +32,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 "9:1:7")
SET (CARES_LIB_VERSIONINFO "9:2:7")


OPTION (CARES_STATIC "Build as a static library" OFF)
Expand All @@ -38,6 +42,7 @@ OPTION (CARES_STATIC_PIC "Build the static library as PIC (position independent)
OPTION (CARES_BUILD_TESTS "Build and run tests" OFF)
OPTION (CARES_BUILD_CONTAINER_TESTS "Build and run container tests (implies CARES_BUILD_TESTS, Linux only)" OFF)
OPTION (CARES_BUILD_TOOLS "Build tools" ON)
OPTION (CARES_SYMBOL_HIDING "Hide private symbols in shared libraries" OFF)
SET (CARES_RANDOM_FILE "/dev/urandom" CACHE STRING "Suitable File / Device Path for entropy, such as /dev/urandom")


Expand Down Expand Up @@ -70,6 +75,21 @@ IF (MSVC)
ENDIF ()
ENDIF ()

IF (CARES_SYMBOL_HIDING)
IF (CMAKE_VERSION VERSION_LESS 3.12)
MESSAGE (FATAL_ERROR "Hiding symbols requires CMake 3.12")
ENDIF ()
CMAKE_POLICY (SET CMP0063 NEW)
SET (CARES_SYMBOL_SCOPE_EXTERN [=[__attribute__ ((visibility("default")))]=])
CHECK_C_SOURCE_COMPILES ("
${CARES_SYMBOL_SCOPE_EXTERN} int somefunc() { return 0; }
int main() { return somefunc(); }
" HAVE_VISIBILITY_ATTRIBUTE)
IF (NOT HAVE_VISIBILITY_ATTRIBUTE)
MESSAGE (FATAL_ERROR "C compiler does not accept visibility attribute")
ENDIF ()
ENDIF ()

# Keep build organized.
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}")
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
Expand Down
4 changes: 2 additions & 2 deletions deps/cares/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ EXTRA_DIST = AUTHORS CHANGES README.cares $(man_MANS) RELEASE-NOTES \
c-ares-config.cmake.in libcares.pc.cmake libcares.pc.in buildconf get_ver.awk \
maketgz TODO README.msvc $(MSVCFILES) INSTALL.md README.md LICENSE.md \
CMakeLists.txt Makefile.dj Makefile.m32 Makefile.netware Makefile.msvc \
Makefile.Watcom AUTHORS CONTRIBUTING.md SECURITY.md TODO

Makefile.Watcom AUTHORS CONTRIBUTING.md SECURITY.md TODO \
cmake/EnableWarnings.cmake

CLEANFILES = $(PDFPAGES) $(HTMLPAGES)

Expand Down
6 changes: 5 additions & 1 deletion deps/cares/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_ac_append_to_file.m4 \
$(top_srcdir)/m4/ax_ac_print_to_file.m4 \
$(top_srcdir)/m4/ax_add_am_macro_static.m4 \
$(top_srcdir)/m4/ax_am_macros_static.m4 \
$(top_srcdir)/m4/ax_append_compile_flags.m4 \
$(top_srcdir)/m4/ax_append_flag.m4 \
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
$(top_srcdir)/m4/ax_check_gnu_make.m4 \
$(top_srcdir)/m4/ax_code_coverage.m4 \
$(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
Expand Down Expand Up @@ -430,7 +433,8 @@ EXTRA_DIST = AUTHORS CHANGES README.cares $(man_MANS) RELEASE-NOTES \
c-ares-config.cmake.in libcares.pc.cmake libcares.pc.in buildconf get_ver.awk \
maketgz TODO README.msvc $(MSVCFILES) INSTALL.md README.md LICENSE.md \
CMakeLists.txt Makefile.dj Makefile.m32 Makefile.netware Makefile.msvc \
Makefile.Watcom AUTHORS CONTRIBUTING.md SECURITY.md TODO
Makefile.Watcom AUTHORS CONTRIBUTING.md SECURITY.md TODO \
cmake/EnableWarnings.cmake

CLEANFILES = $(PDFPAGES) $(HTMLPAGES)
DISTCLEANFILES = include/ares_build.h
Expand Down
2 changes: 1 addition & 1 deletion deps/cares/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If you find bugs, correct flaws, have questions or have comments in general in
regard to c-ares (or by all means the original ares too), get in touch with us
on the c-ares mailing list: https://lists.haxx.se/listinfo/c-ares

c-ares is distributed the MIT license.
c-ares is distributed under the MIT license.

You'll find all c-ares details and news here:
https://c-ares.org/
Expand Down
95 changes: 30 additions & 65 deletions deps/cares/RELEASE-NOTES
Original file line number Diff line number Diff line change
@@ -1,74 +1,39 @@
c-ares version 1.20.1
c-ares version 1.21.0

This release resolves a significant issue in the 1.20.0 release.

Bug fixes:
o Resolve use-after-free issue when TCP connection is terminated before a
response is returned [17]
o Reduce number of queries for a load test case to prevent overloading some
build systems
o Fix fuzz test build target [18]


c-ares 1.20.0 notes below:

This is a feature and bugfix release with some significant internal changes.
This is a bugfix and cleanup release with some significant internal changes.

Changes:
o Update from 1989 MIT license text to modern MIT license text [1]
o Remove acountry from built tools as nerd.dk is gone [3]
o Add new ARES_OPT_UDP_MAX_QUERIES configuration option to limit the number of
queries that can be made from a single ephemeral port [7]
o Default per-query timeout has been reduced to 2s with a 3x retry count [8]
o Modernization: start implementing some common data structures that are easy
to use and hard to misuse. This will make code refactoring easier and remove
some varied implementations in use. This change also makes ares_timeout()
more efficient [9]
o Use SPDX identifiers and a REUSE CI job to verify [12]
o rand: add support for getrandom() [14]

Bug fixes:
o TCP back to back queries were broken [2]
o Ensure queries for ares_getaddrinfo() are not requeued during destruction [4]
o ares_getaddrinfo() should not retry other address classes if one address
class has already been returned [5]
o Avoid production ill-formed result when qualifying a name with the root
domain [6]
o Fix missing prefix for CMake generated libcares.pc [10]
o DNS server ports will now be read from system configuration instead of
defaulting to port 53 [11]
o Remove some unreachable code [13]
o Replace usages of sprintf with snprintf [15]
o Fix Watcom instructions and update Windows URLs [16]
o Provide better man page cross-links. [1]
o Introduce ares_status_t as an enum rather than using #define list and
integer data type for internal functions. [2]
o Introduce ares_bool_t datatype rather than using an integer with 0/1 so
it is clear based on the function prototype what it returns. [5]
o Increase compiler warning levels by default. [6]
o Use size_t and other more proper datatypes internally (rather than int). [7]
o Many developers have used different code styles over the years, standardize
on one and use clang-format to enforce the style. [8]
o CMake can now control symbol visibility [9]
o Replace multiple DNS hand-made parsers with new memory-safe DNS message
parser. [10]

Bug Fixes:
o Tools: STAYOPEN flag could make tools not terminate. [3]
o Socket callbacks were passed SOCK_STREAM instead of SOCK_DGRAM on udp. [4]

Thanks go to these friendly people for their efforts and contributions:
Alexey A Tikhonov (@alexey-tikhonov)
Ben Noordhuis (@bnoordhuis)
Brad House (@bradh352)
@Chilledheart
Daniel Stenberg (@bagder)
Douglas R. Reno (@renodr)
Jérôme Duval (@korli)
Sam Morris (@yrro)
Tim Wojtulewicz (@timwoj)
(9 contributors)
Gregor Jasny (@gjasny)
(3 contributors)

References to bug reports and discussions on issues:
[1] = https://github.com/c-ares/c-ares/pull/556
[2] = https://github.com/c-ares/c-ares/pull/552
[3] = https://github.com/c-ares/c-ares/pull/554
[4] = https://github.com/c-ares/c-ares/pull/553
[5] = https://github.com/c-ares/c-ares/pull/551
[6] = https://github.com/c-ares/c-ares/pull/546
[7] = https://github.com/c-ares/c-ares/pull/549
[8] = https://github.com/c-ares/c-ares/pull/542
[9] = https://github.com/c-ares/c-ares/pull/540
[10] = https://github.com/c-ares/c-ares/pull/530
[11] = https://github.com/c-ares/c-ares/pull/534
[12] = https://github.com/c-ares/c-ares/commit/c1b00c41
[13] = https://github.com/c-ares/c-ares/pull/527
[14] = https://github.com/c-ares/c-ares/pull/526
[15] = https://github.com/c-ares/c-ares/pull/525
[16] = https://github.com/c-ares/c-ares/pull/524
[17] = https://github.com/c-ares/c-ares/pull/562
[18] = https://github.com/c-ares/c-ares/pull/559
[1] = https://github.com/c-ares/c-ares/pull/565
[2] = https://github.com/c-ares/c-ares/pull/567
[3] = https://github.com/c-ares/c-ares/pull/569
[4] = https://github.com/c-ares/c-ares/commit/a070d78
[5] = https://github.com/c-ares/c-ares/pull/570
[6] = https://github.com/c-ares/c-ares/pull/568
[7] = https://github.com/c-ares/c-ares/pull/573
[8] = https://github.com/c-ares/c-ares/pull/579
[9] = https://github.com/c-ares/c-ares/pull/574
[10] = https://github.com/c-ares/c-ares/pull/581
3 changes: 3 additions & 0 deletions deps/cares/aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,9 @@ m4_include([m4/ax_ac_append_to_file.m4])
m4_include([m4/ax_ac_print_to_file.m4])
m4_include([m4/ax_add_am_macro_static.m4])
m4_include([m4/ax_am_macros_static.m4])
m4_include([m4/ax_append_compile_flags.m4])
m4_include([m4/ax_append_flag.m4])
m4_include([m4/ax_check_compile_flag.m4])
m4_include([m4/ax_check_gnu_make.m4])
m4_include([m4/ax_code_coverage.m4])
m4_include([m4/ax_cxx_compile_stdcxx.m4])
Expand Down
2 changes: 1 addition & 1 deletion deps/cares/aminclude_static.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# aminclude_static.am generated automatically by Autoconf
# from AX_AM_MACROS_STATIC on Sun Oct 8 23:23:39 CEST 2023
# from AX_AM_MACROS_STATIC on Fri Oct 27 08:44:51 CEST 2023


# Code coverage
Expand Down
13 changes: 8 additions & 5 deletions deps/cares/cares.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
'src/lib/ares_data.c',
'src/lib/ares_data.h',
'src/lib/ares_destroy.c',
'src/lib/ares_dns_mapping.c',
'src/lib/ares_dns_parse.c',
'src/lib/ares_dns_record.c',
'src/lib/ares_dns_record.h',
'src/lib/ares_expand_name.c',
'src/lib/ares_expand_string.c',
'src/lib/ares_fds.c',
Expand All @@ -49,9 +53,8 @@
'src/lib/ares_init.c',
'src/lib/ares_ipv6.h',
'src/lib/ares_library_init.c',
'src/lib/ares_math.c',
'src/lib/ares_mkquery.c',
'src/lib/ares_nowarn.c',
'src/lib/ares_nowarn.h',
'src/lib/ares_options.c',
'src/lib/ares_parse_a_reply.c',
'src/lib/ares_parse_aaaa_reply.c',
Expand All @@ -74,8 +77,8 @@
'src/lib/ares_setup.h',
'src/lib/ares_strcasecmp.c',
'src/lib/ares_strcasecmp.h',
'src/lib/ares_strdup.c',
'src/lib/ares_strdup.h',
'src/lib/ares_str.c',
'src/lib/ares_str.h',
'src/lib/ares_strerror.c',
'src/lib/ares_strsplit.c',
'src/lib/ares_timeout.c',
Expand Down Expand Up @@ -203,4 +206,4 @@
]
}
]
}
}
Loading
Loading