]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
4 weeks agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 8 Mar 2026 22:08:05 +0000 (23:08 +0100)] 
RELEASE-NOTES: synced

4 weeks agotest1850: verify the SMB request path use for two transfers
Daniel Stenberg [Sun, 8 Mar 2026 13:53:43 +0000 (14:53 +0100)] 
test1850: verify the SMB request path use for two transfers

4 weeks agosmb: free the path in the request struct properly
Stefan Eissing [Sun, 8 Mar 2026 13:30:00 +0000 (14:30 +0100)] 
smb: free the path in the request struct properly

Closes #20854

4 weeks agotests/server: drop unused `curlx/version_win32.c`
Viktor Szakats [Sun, 8 Mar 2026 16:47:43 +0000 (17:47 +0100)] 
tests/server: drop unused `curlx/version_win32.c`

Previously used via `curlx/timeval.c`, but no longer after bumping
minimum target to Vista.

Follow-up to b17ef873ae2151263667f4b6fb6abfe337e687dc #18009

Closes #20855

4 weeks agosystem_win32: replace manual init code with `curlx_now_init()` call
Viktor Szakats [Sun, 8 Mar 2026 14:26:21 +0000 (15:26 +0100)] 
system_win32: replace manual init code with `curlx_now_init()` call

The code actual init code remains identical after this patch. To make it
clearer where this initialization is called from, and to dedupe code.

Follow-up to b17ef873ae2151263667f4b6fb6abfe337e687dc #18009

Closes #20852

4 weeks agodocs: replace instances of the vague qualifier 'quite'
dbalsom [Fri, 6 Mar 2026 17:58:44 +0000 (12:58 -0500)] 
docs: replace instances of the vague qualifier 'quite'

in documentation and comments

Closes #20841

4 weeks agodocs: avoid starting sentences with However,
Daniel Stenberg [Fri, 6 Mar 2026 10:30:20 +0000 (11:30 +0100)] 
docs: avoid starting sentences with However,

An unnecessary filling word

Closes #20834

4 weeks agoquiche: use PRIu64 for outputting the stream id
Daniel Stenberg [Sat, 7 Mar 2026 22:17:53 +0000 (23:17 +0100)] 
quiche: use PRIu64 for outputting the stream id

The 'id' struct field in 'struct h3_stream_ctx' is a uint64_t type so
should be output with PRIu64 - and it makes sense to be consistent.

Note that the field with the same name in the ngtcp2 version of this
struct is a *signed* 64-bit variable.

Reported by Codex Security

Closes #20849

4 weeks agoDEPRECATE.md: SMB and NTLM become build-time opt-in
Daniel Stenberg [Sat, 7 Mar 2026 13:44:17 +0000 (14:44 +0100)] 
DEPRECATE.md: SMB and NTLM become build-time opt-in

Closes #20847

4 weeks agotests/FILEFORMAT.md: the <server> section is NOT mandatory
Daniel Stenberg [Sat, 7 Mar 2026 12:44:33 +0000 (13:44 +0100)] 
tests/FILEFORMAT.md: the <server> section is NOT mandatory

It can be left out if no servers are necessary.

Closes #20845

4 weeks agotest1849: reuse a proxy with different credentials
Daniel Stenberg [Fri, 6 Mar 2026 22:08:31 +0000 (23:08 +0100)] 
test1849: reuse a proxy with different credentials

Closes #20842

4 weeks agocf-socket: ignore SOCK_CLOEXEC etc for socktype equality checks
Daniel Stenberg [Sat, 7 Mar 2026 10:24:18 +0000 (11:24 +0100)] 
cf-socket: ignore SOCK_CLOEXEC etc for socktype equality checks

As the SOCK_CLOEXEC and SOCK_NONBLOCK get ORed to the socktype, this
introduces the cf_socktype() function to use when checking for the
specific socket type: DGRAM or STREAM. The function filters off the
non-type related bits to enable the comparison.

Follow-up to 05367694ecf24a5d39f

Closes #20808

4 weeks agohttp: only send bearer if auth is allowed
Daniel Stenberg [Fri, 6 Mar 2026 22:13:07 +0000 (23:13 +0100)] 
http: only send bearer if auth is allowed

Verify with test 2006

Closes #20843

4 weeks agodocs: drop basically
Daniel Stenberg [Fri, 6 Mar 2026 10:37:33 +0000 (11:37 +0100)] 
docs: drop basically

Another filler word

Closes #20835

5 weeks agoFAQ: syntax improvements
Andrei Rybak [Wed, 4 Mar 2026 09:11:58 +0000 (10:11 +0100)] 
FAQ: syntax improvements

During conversion of `docs/FAQ` into Markdown, 'man ld' has incorrectly
kept one of its quotes when it was surrounded by backticks for inline
code formatting.  A space on the left of it was lost as well.

Fix the formatting in the new `docs/FAQ.md`.

Closes #20812

5 weeks agomqtt: fix EOF handling
Stefan Eissing [Fri, 6 Mar 2026 07:38:03 +0000 (08:38 +0100)] 
mqtt: fix EOF handling

In mqtt_recv_atleast(), recognize an EOF as error.

Fixes #20815
Reported-by: Max Dymond
Closes #20830

5 weeks agoproxy-auth: additional tests
Stefan Eissing [Fri, 6 Mar 2026 13:54:09 +0000 (14:54 +0100)] 
proxy-auth: additional tests

Also eliminate the special handling for socks proxy match.

Closes #20837

5 weeks agosocketpair: clear 'err' when retrying due to EINTR
Daniel Stenberg [Tue, 3 Mar 2026 22:50:08 +0000 (23:50 +0100)] 
socketpair: clear 'err' when retrying due to EINTR

If the first write was interrupted by a signal and a subsequent write
succeeds, the function would still erroneously return EINTR.

Found by Codex Security
Closes #20809

5 weeks agosynctime: fix use of uninitialized buffer on non-Windows
Daniel Stenberg [Tue, 3 Mar 2026 22:11:51 +0000 (23:11 +0100)] 
synctime: fix use of uninitialized buffer on non-Windows

Follow-up to: b714c674f3

Spotted by Codex Security
Closes #20806

5 weeks agocontent_encoding: return 'identity' if none other exists
Daniel Stenberg [Tue, 3 Mar 2026 22:06:24 +0000 (23:06 +0100)] 
content_encoding: return 'identity' if none other exists

This fixes a regression and accidental changed behavior shipped in
8.18.0 (via 6b9c75e219cdcfd3e17e78).

When the setopt is set to "" and curl is built without support for a
single compression algorithm, it used to use "identity" but recently did
not.

Spotted by Codex Security
Closes #20805

5 weeks agotool_doswin: avoid memory-leak with CURL_FN_SANITIZE_*
Daniel Stenberg [Tue, 3 Mar 2026 21:57:46 +0000 (22:57 +0100)] 
tool_doswin: avoid memory-leak with CURL_FN_SANITIZE_*

This is debug-only code

Follow-up to 20900e4a1e3

Found by Codex Security

Closes #20804

5 weeks agotool_operate: reset the URL --url-query between --next
Daniel Stenberg [Tue, 3 Mar 2026 17:50:20 +0000 (18:50 +0100)] 
tool_operate: reset the URL --url-query between --next

Pointed out by Codex Security

Verify in test 1624
Closes #20802

5 weeks agoopenssl+ech: workaround for insecure handshakes
Stefan Eissing [Thu, 5 Mar 2026 12:56:49 +0000 (13:56 +0100)] 
openssl+ech: workaround for insecure handshakes

OpenSSL 4.0.0-dev supports ECH with one flaw. If peer verification
is not enabled, it will report SSL_ECH_STATUS_BAD_NAME on the ECH
status.

Provide a workaround in libcurl that checks the inner name used in
ECH was the peer's hostname, both verify peer and host are disabled
and then accept the BAD_NAME without failing the connect.

Fixes #20655
Reported-by: Dexter Gerig
Closes #20821

5 weeks agoasync-ares: blocking resolve timeout handling, better
Stefan Eissing [Thu, 5 Mar 2026 09:20:58 +0000 (10:20 +0100)] 
async-ares: blocking resolve timeout handling, better

Perform the actual timeout calculation in the blocking resolv
loop each time in the same way, keeping the logic simpler.

The previous version calculated the timeout once, and then
reduced it by the elapsed time spent in polling/processing.
This is unnecessarily complicated.

Closes #20819

5 weeks agourldata: byebye `conn->hostname_resolve`
Stefan Eissing [Fri, 6 Mar 2026 10:09:29 +0000 (11:09 +0100)] 
urldata: byebye `conn->hostname_resolve`

The strdup() of the hostname to resolve is unnecessary as the sync
resolve code does not keep the string and the async code makes copies
already.

Remove the member from `connectdata`.

Closes #20833

5 weeks agocmake: fix `LOCATION` property access condition (debug)
Viktor Szakats [Fri, 6 Mar 2026 14:18:31 +0000 (15:18 +0100)] 
cmake: fix `LOCATION` property access condition (debug)

To match other parts of curl's CMake script and the CMake source.

Ref: https://gitlab.kitware.com/cmake/cmake/-/blob/v3.18.0/Source/cmTargetPropertyComputer.h?ref_type=tags#L68-101

Follow-up to c6cfb2a2f34df80c6d746d1cb07705d3fac7e67a #20828

Closes #20838

5 weeks agocmake: improve clang-tidy test command-line reproduction
Viktor Szakats [Fri, 6 Mar 2026 00:51:30 +0000 (01:51 +0100)] 
cmake: improve clang-tidy test command-line reproduction

- also query `INTERFACE_COMPILE_DEFINITIONS` and
  `INTERFACE_COMPILE_OPTIONS`.
  To further sync clang-tidy manual command-lines with the C compiler
  command-lines generated by CMake. In practice this adds `-I` options
  (via `INTERFACE_COMPILE_OPTIONS`) to the end of the command-line for
  dependency header directories. It does not change the outcome of
  clang-tidy runs.

- limit querying `COMPILE_DEFINITIONS` and `COMPILE_OPTIONS` to the top
  target, the test itself. To not include options such as
  `-DCURL_HIDDEN_SYMBOLS` and `-fvisibility=hidden` (when set) via
  the libcurl shared lib.
  To sync with the actual C compiler command-line.

- drop redundant `unset()`.

- rename local function to be more specific.

Follow-up to d9386a2f8ec3c4bd5ababc4eeb96ecd3e522b77c #20759

Closes #20829

5 weeks agocmake: fix `LOCATION` property read errors in target debug function
Viktor Szakats [Fri, 6 Mar 2026 02:42:41 +0000 (03:42 +0100)] 
cmake: fix `LOCATION` property read errors in target debug function

Exclude reading certain props for certain target types to avoid these errors:
```
CMake Error at CMake/Utilities.cmake:71 (get_property):
  The LOCATION property may not be read from target "...".  Use the target
  name directly with add_custom_command, or use the generator expression
  $<TARGET_FILE>, as appropriate.
```
(and the same in line 78.)

Follow-up to 855acb3bb07e0dd06b5722218eb5fded333f7ce0 #17701

Closes #20828

5 weeks agospelling: bump codespell to 2.4.2, fix fallouts
Viktor Szakats [Thu, 5 Mar 2026 23:22:13 +0000 (00:22 +0100)] 
spelling: bump codespell to 2.4.2, fix fallouts

Closes #20825
Closes #20827

5 weeks agounit3205: drop `NOLINT`
Viktor Szakats [Wed, 4 Mar 2026 23:34:29 +0000 (00:34 +0100)] 
unit3205: drop `NOLINT`

In favor or a small code change the silences the clang-tidy warning.

Follow-up to b1f853a3849d0e8116ae4e2aedfb9ca65f92282d #20731

Closes #20820

5 weeks agocmake: mark two internal options as advanced
Viktor Szakats [Thu, 5 Mar 2026 01:30:06 +0000 (02:30 +0100)] 
cmake: mark two internal options as advanced

To omit them from CMake GUI option listings.

Follow-up to c37e06c642066b6cbf6b3c58278017ad40820bb3 #17962
Follow-up to 6ab1fa423bcc49a742b1cde2164ff981fdee38e8 #16278

Closes #20818

5 weeks agosocks: ensure DNS is freed in failure cases.
Max Dymond [Wed, 4 Mar 2026 10:24:15 +0000 (10:24 +0000)] 
socks: ensure DNS is freed in failure cases.

In several error cases in socks.c the DNS struct is not freed, which
leads to memory leaks.

Found by: OSS-Fuzz: 447858136

Closes #20813

5 weeks agoexamples: improve OpenSSL certificate examples
Viktor Szakats [Tue, 3 Mar 2026 17:44:29 +0000 (18:44 +0100)] 
examples: improve OpenSSL certificate examples

- add/fix/synchronize error messages and comments.
- consistently return error from the callback on failure.
- fix potential leaks on OpenSSL API failures.
- fix to not pass the nul-terminator to BIO read.
- scope a variable.
- sync code/formatting between the two examples.

Closes #20807

5 weeks agousercertinmem: use the correct cert BIO
Daniel Stenberg [Tue, 3 Mar 2026 17:21:16 +0000 (18:21 +0100)] 
usercertinmem: use the correct cert BIO

PEM_read_bio_PrivateKey() is called with the wrong BIO, so the private
key is not loaded.

Follow-up to 8494012196474ee0541

Pointed out by Codex Security
Closes #20800

5 weeks agocurl.h: remove CURLPROTO_MQTTS from the public header
Daniel Stenberg [Tue, 3 Mar 2026 16:55:37 +0000 (17:55 +0100)] 
curl.h: remove CURLPROTO_MQTTS from the public header

- the value collided with the internal one used for WebSocket
- we add all new ones as internal bits
- bump to 64-bit internal type
- introduce new define for setting all protocols (CURLPROTO_64ALL)

Reported by Codex Security

Closes #20798

5 weeks agoconfig2setopts: restore proper ignoring of CAINFO BLOB option errors
Daniel Stenberg [Tue, 3 Mar 2026 17:03:52 +0000 (18:03 +0100)] 
config2setopts: restore proper ignoring of CAINFO BLOB option errors

A regression from refactors

Spotted by Codex Security

Closes #20799

5 weeks agoschannel: fix UAF in client cert store thumbprint handling
Daniel Stenberg [Tue, 3 Mar 2026 17:38:19 +0000 (18:38 +0100)] 
schannel: fix UAF in client cert store thumbprint handling

Follow-up to 10bb489b22d1777f2984aa5

Found by Codex Security
Closes #20801

5 weeks agoopenssl: adapt to OpenSSL master adding const to more APIs
Daniel Stenberg [Tue, 3 Mar 2026 15:59:21 +0000 (16:59 +0100)] 
openssl: adapt to OpenSSL master adding const to more APIs

Closes #20797

5 weeks agocmake: fix building with `CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON`
Viktor Szakats [Sun, 1 Mar 2026 15:19:33 +0000 (16:19 +0100)] 
cmake: fix building with `CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON`

This CMake global custom option tells it to find dependencies as cmake
Configs first, and only then look for `Find*` modules. This may result
in `find_package()` succeeding, but without actually creating `CURL::*`
imported targets the curl build scripts are expecting.

For dependencies with curl-specific, local, `Find*` modules, we always
want to use them, via the module detection method, and never a
Config-based detection. Ensure this by passing the `MODULE` option to
`find_package()` and `find_dependency()` to make them use `Find*`
modules unconditionally, making them work as expected with the
`CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON` option set.

curl uses local Find modules for all dependencies except OpenSSL and
ZLIB. The latter two keep using either CMake's built-in Find modules or
Config method as before this patch.

Also:

- apply the same change to `curl-config.cmake`. To fix consuming curl
  with this option set.
Authored-by: Valerie Snyder
  Ref: #20764
  Follow-up to 16f073ef49f94412000218c9f6ad04e3fd7e4d01 #16973

- GHA/distcheck: add a job testing both building and consuming curl with
  this option set. (takes 15 seconds)
  Use custom NGHTTP2 configuration for an extra twist (not required
  to trigger this issue.)
  Follow-up to fcde8d7e3745df3b4d83c86d0a1f0caef398511b #20773

Reported-by: Valerie Snyder
Fixes #20729

Closes #20784

5 weeks agourlapi: use U_CURLU_URLDECODE when toggling it off unsigned
Daniel Stenberg [Sat, 28 Feb 2026 09:48:59 +0000 (10:48 +0100)] 
urlapi: use U_CURLU_URLDECODE when toggling it off unsigned

In this use case 'unsigned value &= ~DEFINE;

As otherwise the right side is treated as signed, which annoyingly
triggers UBSan. The U_* defines are local versions of the public define,
only typecast to unsigned.

Reported-by: xmoezzz on github
Fixes #20753
Closes #20769

5 weeks agodocs: avoid using the word 'magic'
Daniel Stenberg [Tue, 3 Mar 2026 12:53:36 +0000 (13:53 +0100)] 
docs: avoid using the word 'magic'

It's never actually magic.

Closes #20796

5 weeks agostop using the word 'just'
Daniel Stenberg [Mon, 2 Mar 2026 22:41:35 +0000 (23:41 +0100)] 
stop using the word 'just'

Everywhere. In documentation and code comments.

It is almost never a good word and almost always a filler that should be
avoided.

Closes #20793

5 weeks agoDockerfile: update debian:bookworm-slim digest to 74d56e3
renovate[bot] [Tue, 24 Feb 2026 21:28:38 +0000 (21:28 +0000)] 
Dockerfile: update debian:bookworm-slim digest to 74d56e3

Closes #20714

5 weeks agocmake: stop disabling C4774 after replacing `snprintf()`, update comment (MSVC)
Viktor Szakats [Mon, 2 Mar 2026 21:47:06 +0000 (22:47 +0100)] 
cmake: stop disabling C4774 after replacing `snprintf()`, update comment (MSVC)

- update comment for `-wd4710` option.
  Ref: https://ci.appveyor.com/project/curlorg/curl/builds/53627545
- stop suppressing C4774. Not triggered by the replacement call
  `vsnprintf()`, as also confirmed by local tests.
  Follow-up to https://github.com/curl/curl/commit/192b9214a7cf9082665ce460617308cb4836850b
  Ref: https://devblogs.microsoft.com/cppblog/format-specifiers-checking/
  Ref: https://learn.microsoft.com/cpp/error-messages/compiler-warnings/compiler-warnings-c4600-through-c4799

Follow-up to 64f28b8f8859fc80816f7db3b5c4b6f2fd84bd27 #20765

Closes #20792

5 weeks agombedtls: guard TLS 1.3 + session tickets usage inside ifdef
Daniel Díaz [Fri, 27 Feb 2026 21:07:01 +0000 (15:07 -0600)] 
mbedtls: guard TLS 1.3 + session tickets usage inside ifdef

If TLS 1.3 is not supported, the call to
`mbedtls_ssl_conf_tls13_enable_signal_new_session_tickets()` fails
during compilation:
```
curl-8.18.0/lib/vtls/mbedtls.c: In function 'mbed_connect_step1':
curl-8.18.0/lib/vtls/mbedtls.c:809:3: error: implicit declaration of function 'mbedtls_ssl_conf_tls13_enable_signal_new_session_tickets' [-Werror=implicit-function-declaration]
   mbedtls_ssl_conf_tls13_enable_signal_new_session_tickets(&backend->config,
   ^
curl-8.18.0/lib/vtls/mbedtls.c:809:3: warning: nested extern declaration of 'mbedtls_ssl_conf_tls13_enable_signal_new_session_tickets' [-Wnested-externs]
```

Protect this call inside the `#ifdef` block by making sure that support
for TLS 1.3 is defined.

Closes #20789

5 weeks agobuild: drop unused `snprintf()` feature check on Windows
Viktor Szakats [Mon, 2 Mar 2026 20:47:38 +0000 (21:47 +0100)] 
build: drop unused `snprintf()` feature check on Windows

Follow-up to 64f28b8f8859fc80816f7db3b5c4b6f2fd84bd27 #20765

Closes #20790

5 weeks agomprintf: silence clang-tidy `readability-suspicious-call-argument`
Viktor Szakats [Mon, 2 Mar 2026 20:56:05 +0000 (21:56 +0100)] 
mprintf: silence clang-tidy `readability-suspicious-call-argument`

Follow-up to 64f28b8f8859fc80816f7db3b5c4b6f2fd84bd27 #20765

Closes #20791

5 weeks agocurlx: add local `snprintf()` helper that always nul-terminates (Windows)
Viktor Szakats [Fri, 27 Feb 2026 15:43:16 +0000 (16:43 +0100)] 
curlx: add local `snprintf()` helper that always nul-terminates (Windows)

Make the helper use `vsnprintf()` internally on all supported Windows
toolchains (dropping `_snprintf()` and `snprintf()`), ensure to
nul-terminate. Omit the return value to avoid complexity.

Use the helper from `mprintf.c` / `out_double()`, from tests/server code
and the tests/server-specific build of `curlx_inet_ntop()`,
`curlx_strerror()` functions. In the single call (in tests) where the
returned length was used previously, determine it with `strlen()`.

Refs:
https://github.com/libssh2/libssh2/blob/libssh2-1.11.1/src/misc.c#L57-L79
https://learn.microsoft.com/cpp/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l
https://learn.microsoft.com/cpp/c-runtime-library/reference/vsnprintf-vsnprintf-vsnprintf-l-vsnwprintf-vsnwprintf-l

Assisted-by: Jay Satiro
Follow-up to fa8bd1cc09125b368d4295c19331bf33e2d0c602 #20761
Follow-up to 8ab468c8aa2e3b7b2354f0e9545859ca631f4457 #15997

Closes #20765

5 weeks agomulti: fix unreachable code compiler warning
Viktor Szakats [Sat, 28 Feb 2026 21:43:19 +0000 (22:43 +0100)] 
multi: fix unreachable code compiler warning

```
lib/multi.c:305:5: error: code will never be executed [clang-diagnostic-unreachable-code]
  305 |     goto error;
      |     ^~~~~~~~~~
```

Cherry-picked from #20774

Closes #20788

5 weeks agoclang-tidy: fix `readability-suspicious-call-argument`
Viktor Szakats [Wed, 18 Feb 2026 13:24:00 +0000 (14:24 +0100)] 
clang-tidy: fix `readability-suspicious-call-argument`

Also:
- curlx/strerr: avoid a false positive by dropping an interim variable.
- enable this check.

Ref: #20627 (initial attempt)

Closes #20777

5 weeks agocmake: minor improvements to integration test framework
Viktor Szakats [Sat, 28 Feb 2026 18:28:42 +0000 (19:28 +0100)] 
cmake: minor improvements to integration test framework

- add support for separate provider / consumer cmake options in
  `find_package` tests. To help test more integration scenarios.
  Refs: #20784 #20729 #20764

- dump generated curl config files in `find_package` tests.
  (cmake CONFIG source, `libcurl.pc`, `curl-config`.

- test.sh: use `sha256sum` (was: `openssl`).

Closes #20773

5 weeks agoclang-tidy: enable `clang-analyzer-*` checks explicitly, fix fallout
Viktor Szakats [Sun, 1 Mar 2026 03:03:15 +0000 (04:03 +0100)] 
clang-tidy: enable `clang-analyzer-*` checks explicitly, fix fallout

v22.1.0 disabled them by default.

Fix fallout:
- http: check NULL to silence false positives in `HD_VAL()`.

Ref: https://releases.llvm.org/22.1.0/tools/clang/tools/extra/docs/ReleaseNotes.html#improvements-to-clang-tidy

Follow-up to da6fbb12a6598a7c9e9e54d66e1454973ffc888e #20779
Follow-up to ce4db9c2efca0bd89e556e231d940c988d84a606 #20751

Closes #20778

5 weeks agohttp1: fix potential NULL dereference in `Curl_h1_req_parse_read()`
Viktor Szakats [Sun, 1 Mar 2026 03:46:39 +0000 (04:46 +0100)] 
http1: fix potential NULL dereference in `Curl_h1_req_parse_read()`

Reported by clang-tidy v22 with `clang-analyzer-*` explicitly enabled:

```
lib/http1.c:89:31: error: Subtraction of a non-null pointer
 (from variable 'line_end') and a null pointer (via field 'line')
 results in undefined behavior [clang-analyzer-core.NullPointerArithm]
   89 |   parser->line_len = line_end - parser->line + 1;
      |                               ^
```
Ref: https://github.com/curl/curl/actions/runs/22534731241/job/65279952830?pr=20778#step:11:85

Ref: #20778

Closes #20779

5 weeks agoTODO: drop the alt-svc fallback
Daniel Stenberg [Mon, 2 Mar 2026 08:09:10 +0000 (09:09 +0100)] 
TODO: drop the alt-svc fallback

Let's return to this subject if someone actually needs this for their
specific use case.

See #17152
Closes #20786

5 weeks agotest1637: verify --fail and --retry with 502 response code
Daniel Stenberg [Sun, 1 Mar 2026 12:21:11 +0000 (13:21 +0100)] 
test1637: verify --fail and --retry with 502 response code

It should exit with 22 after the second retry.

Ref: #20771
Cloes #20780

5 weeks agoHISTORY: mention that Rafael passed away much too early
Daniel Stenberg [Sun, 1 Mar 2026 12:40:06 +0000 (13:40 +0100)] 
HISTORY: mention that Rafael passed away much too early

Closes #20781

5 weeks agoGHA: bump actions and pip dependencies
dependabot[bot] [Sun, 1 Mar 2026 14:58:16 +0000 (14:58 +0000)] 
GHA: bump actions and pip dependencies

- update action `actions/cache` from 5.0.1 to 5.0.3
- update action `github/codeql-action` from 4.31.9 to 4.32.4
- update pip `filelock` from 3.20.3 to 3.24.3
- update pip `ruff` from 0.14.14 to 0.15.2

Closes #20782
Closes #20783

5 weeks agocmake: rename `testbins` target to `tt`, restore internal option
Viktor Szakats [Sat, 28 Feb 2026 00:33:05 +0000 (01:33 +0100)] 
cmake: rename `testbins` target to `tt`, restore internal option

To make it easy to type. The internal option is used in CI.

Follow-up to aae361242f30eafacf46085ed731b1524bfd3be9 #20708

Closes #20768

5 weeks agoGHA/windows: bump clang-tidy job to clang v20 (from v18)
Viktor Szakats [Sat, 28 Feb 2026 22:53:08 +0000 (23:53 +0100)] 
GHA/windows: bump clang-tidy job to clang v20 (from v18)

Adds 50 seconds to the 5m long build step. Also more prerequisites to
install, with no apparent effect on step time.

Follow-up to 9b52d516bb8990107f20c9786e09dbb6961c30b2 #20732

Closes #20775

5 weeks agoclang-tidy: fix issues found with build-fuzzing
Viktor Szakats [Sat, 28 Feb 2026 21:41:23 +0000 (22:41 +0100)] 
clang-tidy: fix issues found with build-fuzzing

- curl_sha512_256: add missing, drop redundant, parentheses.
- doh: drop redundant returns.
- url: add missing parentheses.
- vtls: fix unused const variables.
- tests/unit: fix missing header with clang-tidy and !threaded-resolver.
  Follow-up to 57ff2d6c918d0bb444e5a8a53405217aec116b1b #20106

Closes #20774

5 weeks agoclang-tidy: silence more minor issues found by v22
Viktor Szakats [Sat, 28 Feb 2026 10:29:16 +0000 (11:29 +0100)] 
clang-tidy: silence more minor issues found by v22

Also one found manually in lib/curl_sha512_256.c.

Follow-up to 7a08c5d820fcf237688562a237a05000214db789 #20762

Closes #20770

6 weeks agodocs: some nitpicks
Florian Imdahl [Thu, 26 Feb 2026 18:48:57 +0000 (19:48 +0100)] 
docs: some nitpicks

- replaced double spaces with single space where applicable
- replaced "favourite" with "favorite"
- added language identifiers to code blocks in markdown files
- added extra line after code blocks and after headings in markdown
  files

Cloes #20748

6 weeks agoINSTALL.md: fix typo
Daniel Stenberg [Fri, 27 Feb 2026 21:29:09 +0000 (22:29 +0100)] 
INSTALL.md: fix typo

Reported-by: Nathan-M-code on github
Fixes #20766
Closes #20767

6 weeks agoappveyor: minor improvements [ci skip]
Viktor Szakats [Thu, 26 Feb 2026 23:03:18 +0000 (00:03 +0100)] 
appveyor: minor improvements [ci skip]

- make per-job cmake options override default ones (as in GHA)
- also upload `.lib` artifacts (in commented code)

Cherry-picked from #20750

6 weeks agoldap: silence clang-tidy v22 warning
Viktor Szakats [Fri, 27 Feb 2026 14:03:28 +0000 (15:03 +0100)] 
ldap: silence clang-tidy v22 warning

Closes #20762

6 weeks agomprintf: use `_snprintf()` when compiled with VS2013 and older
Viktor Szakats [Thu, 26 Feb 2026 23:38:07 +0000 (00:38 +0100)] 
mprintf: use `_snprintf()` when compiled with VS2013 and older

To support floats and doubles when using these old compilers.

Before this patch, these tests most likely failed with them:
```
FAIL 557: 'curl_mprintf() testing' printf, unittest
FAIL 566: 'HTTP GET with CURLINFO_CONTENT_LENGTH_DOWNLOAD and 0 bytes transfer' HTTP, HTTP GET
FAIL 599: 'HTTP GET with progress callback and redirects changing content sizes' HTTP, HTTP POST, chunked Transfer-Encoding
FAIL 1148: 'progress-bar' HTTP, progressbar
```

Also:
- mention `_snprintf()` in the `_CRT_SECURE_NO_WARNINGS` comment.

Follow-up to 7de35515d90d364e851cdde712062b942d6bf36a #20218

Closes #20761

6 weeks agocmake: convert `curl_add_clang_tidy_test_target()` macro to function
Viktor Szakats [Fri, 27 Feb 2026 12:43:51 +0000 (13:43 +0100)] 
cmake: convert `curl_add_clang_tidy_test_target()` macro to function

I thought a macro is necessary to have `get_directory_property()` and
`CMAKE_CURRENT_SOURCE_DIR` work on the correct directory, but it turns
out they do work the same when used in a function.

Closes #20760

6 weeks agocmake: replace `list(FIND)` with `if(var IN_LIST list)`
Viktor Szakats [Fri, 27 Feb 2026 11:03:32 +0000 (12:03 +0100)] 
cmake: replace `list(FIND)` with `if(var IN_LIST list)`

Available since CMake v3.3.

Ref: https://cmake.org/cmake/help/latest/command/if.html#in-list

Closes #20758

6 weeks agoGHA/linux: replace scan-build with clang-tidy
Viktor Szakats [Fri, 27 Feb 2026 00:09:14 +0000 (01:09 +0100)] 
GHA/linux: replace scan-build with clang-tidy

`scan-build` is a (Perl) wrapper around clang's built-in `--analyze`
option. Which look similar or identical to clang-tidy checkers under
the `clang-analyzer-*` namespace:
https://clang.llvm.org/docs/ClangStaticAnalyzer.html

Unless somebody has other information, it appears redundant to run
scan-build in parallel with clang-tidy in CI, now that the latter is
working reliably and with good performance for all curl components.

Another scan-build issue is the lack of a markup to suppress false
positives. It ignores `NOLINT`, yet finds the same false positives as
clang-tidy. This happens with scan-build v20+. v18 is silent, but it's
a blocker to upgrade to a newer version.

scan-build may still be a useful when combined with autotools, where
clang-tidy support is incomplete, slow (no parallelism), and uses
a distinct make target, which does not build binaries in the same pass.
But, scan-build also lacks extra checkers that are now enabled for
clang-tidy.

The clang-tidy job is also 30-40s faster than the one it replaced.

Also:
- drop scan-build job configured the same way as a clang-tidy one.
  CI time saved: 6m30s
- bump to clang-20 (from 18) in the replacement job.
- build tests in the replacement job.
  To verify a cmake command-line reconstruction issue only hit in this
  job in CI.
  CI time cost: 1m40s
- replacement job caught a minor, new, issue.
  Ref: b2076d3c2f5386068d9b0199f25a81147784d8ac #20752
- drop unused scan-build logic.

Bug: https://github.com/curl/curl/pull/20732#issuecomment-3963873838
Ref: https://github.com/curl/curl/pull/20732#issuecomment-3967479228

Closes #20751

6 weeks agocmake: fix system include directory position for clang-tidy in tests
Viktor Szakats [Fri, 27 Feb 2026 03:08:06 +0000 (04:08 +0100)] 
cmake: fix system include directory position for clang-tidy in tests

To avoid a system include masking a custom directory, and e.g. picking
up system OpenSSL headers from `/usr/include` on Linux, instead of the
correct ones from a custom header directory, move system include
directories to the back of the header path list. Also to match what
CMake seems to be doing for the C compiler command-lines it generates.

CMake seems to use `-I`, while for these invocations we stick with
`-isystem` just in case.

This area remains fragile and likely not the final issue.

Fixing (seen in GHA/linux H3 c-ares):
```
Error while processing bld/tests/libtest/lib1521.c.
/usr/include/openssl/macros.h:147:4: error: "OPENSSL_API_COMPAT expresses an impossible API compatibility level" [clang-diagnostic-error]
Found compiler error(s).
  147 | #  error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
      |    ^
FAILED: [code=1] tests/libtest/CMakeFiles/libtests-clang-tidy
```
Ref: https://github.com/curl/curl/actions/runs/22468472670/job/65079885471?pr=20751

Bug: https://github.com/curl/curl/pull/20751#issuecomment-3970180687
Cherry-picked from #20751

Closes #20759

6 weeks agoRELEASE-NOTES: synced rc-8_19_0-3
Daniel Stenberg [Fri, 27 Feb 2026 08:37:29 +0000 (09:37 +0100)] 
RELEASE-NOTES: synced

6 weeks agocfilter: move a debug-only check into ifdef DEBUGBUILD
Daniel Stenberg [Fri, 27 Feb 2026 06:59:10 +0000 (07:59 +0100)] 
cfilter: move a debug-only check into ifdef DEBUGBUILD

Pointed out by CodeSonar

Closes #20756

6 weeks agoftp: remove two redundant assignments
Daniel Stenberg [Fri, 27 Feb 2026 06:54:58 +0000 (07:54 +0100)] 
ftp: remove two redundant assignments

Follow-up to 29bca12978f3ad

Pointed out by CodeSonar

Closes #20755

6 weeks agovquic: fix unused variable warning reported by clang-tidy
Viktor Szakats [Fri, 27 Feb 2026 00:33:08 +0000 (01:33 +0100)] 
vquic: fix unused variable warning reported by clang-tidy

Silencing (seen in new GHA/Linux H3 v20 job):
```
lib/vquic/vquic.c:398:37: error: variable 'calls' set but not used [clang-diagnostic-unused-but-set-variable]
  398 |   size_t total_nread = 0, pkts = 0, calls = 0;
      |                                     ^
```

Cherry-picked from #20751

Closes #20752

6 weeks agoclang-tidy: add missing and delete redundant parentheses
Viktor Szakats [Thu, 26 Feb 2026 20:36:59 +0000 (21:36 +0100)] 
clang-tidy: add missing and delete redundant parentheses

Reported by clang-tidy v22.1.0.

Ref: https://releases.llvm.org/22.1.0/tools/clang/tools/extra/docs/ReleaseNotes.html

Closes #20749

6 weeks agomailmap: Hamza Bensliman
Daniel Stenberg [Thu, 26 Feb 2026 19:01:02 +0000 (20:01 +0100)] 
mailmap: Hamza Bensliman

6 weeks agocmake: fix confusing error when a dependency is undetected in `curl-config.cmake`
Viktor Szakats [Thu, 26 Feb 2026 11:35:51 +0000 (12:35 +0100)] 
cmake: fix confusing error when a dependency is undetected in `curl-config.cmake`

Fixing:
```
CMake Error at /path/to/CURL/CURLConfig.cmake:190 (get_target_property):
  get_target_property() called with non-existent target "CURL::libssh2".
```
and replacing it with the clearer message:
```
CMake Error at /path/to/CURL/CURLTargets.cmake:61 (set_target_properties):
  The link interface of target "CURL::libcurl_static" contains:

    CURL::libssh2

  but the target was not found.  Possible reasons include:
[...]
```

Reported-by: Val S.
Ref: #20729
Follow-up to 16f073ef49f94412000218c9f6ad04e3fd7e4d01 #16973

Closes #20737

6 weeks agoGHA/linux: delete unused autotools clang-tidy logic
Viktor Szakats [Thu, 26 Feb 2026 18:26:37 +0000 (19:26 +0100)] 
GHA/linux: delete unused autotools clang-tidy logic

Follow-up to 26eddf002f0d9e957ff21865bddfbdf25b4521f5 #20725

Closes #20747

6 weeks agoGHA/macos: bump runner to macos-26 in clang-tidy jobs
Viktor Szakats [Thu, 26 Feb 2026 17:28:30 +0000 (18:28 +0100)] 
GHA/macos: bump runner to macos-26 in clang-tidy jobs

Tiny difference in practice:
Apple clang 17.0.0.17000013 -> 17.0.0.17000603

To use the most recent tools for static analyses.

Closes #20745

6 weeks agoGHA/linux: enable clang-tidy for docs/examples
Viktor Szakats [Thu, 26 Feb 2026 16:17:19 +0000 (17:17 +0100)] 
GHA/linux: enable clang-tidy for docs/examples

Also:
- imap-append: silence false positive (seen on Linux only).
  Follow-up to b1f853a3849d0e8116ae4e2aedfb9ca65f92282d #20731
  Follow-up to 725c5609aef19ba53373a49386cd979006b590d6 #20723

Closes #20743

6 weeks agoGHA/macos: drop unused `install_step` values [ci skip]
Viktor Szakats [Thu, 26 Feb 2026 18:12:14 +0000 (19:12 +0100)] 
GHA/macos: drop unused `install_step` values [ci skip]

6 weeks agortsp: fix assertion failure on zero-length RTP payload
hamza [Thu, 26 Feb 2026 16:36:24 +0000 (16:36 +0000)] 
rtsp: fix assertion failure on zero-length RTP payload

Fixes #20735
Reported-by: David Korczynski
Closes #20744

6 weeks agoGHA: update ngtcp2/ngtcp2 to v1.21.0
renovate[bot] [Thu, 26 Feb 2026 12:40:43 +0000 (12:40 +0000)] 
GHA: update ngtcp2/ngtcp2 to v1.21.0

Closes #20738

6 weeks agomulti: avoid a theoretical 32-bit wrap
Daniel Stenberg [Thu, 26 Feb 2026 15:58:15 +0000 (16:58 +0100)] 
multi: avoid a theoretical 32-bit wrap

If Curl_uint32_tbl_count() at some future point actually can return
UINT_MAX, this fixes the math to not wrap.

Closes #20742

6 weeks agoGHA/linux: bump sanitizer jobs to clang v20 (from v18)
Viktor Szakats [Thu, 26 Feb 2026 03:53:30 +0000 (04:53 +0100)] 
GHA/linux: bump sanitizer jobs to clang v20 (from v18)

To use the newest version offered by the runner's Ubuntu 24.04.

Ref: https://packages.ubuntu.com/search?suite=noble-updates&keywords=clang

Closes #20732

6 weeks agoGHA/macos: update comment about macOS targets vs. features
Viktor Szakats [Thu, 26 Feb 2026 14:18:13 +0000 (15:18 +0100)] 
GHA/macos: update comment about macOS targets vs. features

Closes #20741

6 weeks agocmake: silence potential unused var warnings in C++ test snippet
Viktor Szakats [Thu, 26 Feb 2026 11:31:55 +0000 (12:31 +0100)] 
cmake: silence potential unused var warnings in C++ test snippet

Follow-up to 6ad50dc2859e9ea764aafe51b34d430a663fb1d3 #20687

Closes #20736

6 weeks agoVULN-DISCLOSURE-POLICY.md: use hackerone
Daniel Stenberg [Mon, 23 Feb 2026 10:31:18 +0000 (11:31 +0100)] 
VULN-DISCLOSURE-POLICY.md: use hackerone

- bug_report.yml: use hackerone

Closes #20683

6 weeks agoGHA/linux: switch clang-tidy job to cmake for 2x speed, bump to v20, enable for tests
Viktor Szakats [Wed, 25 Feb 2026 14:51:59 +0000 (15:51 +0100)] 
GHA/linux: switch clang-tidy job to cmake for 2x speed, bump to v20, enable for tests

Checking lib and src under 3m15s versus 7m15s.

Downside: autotools clang-tidy support is no longer CI-tested.

The reason for the slowness is invoking a single clang-tidy command with
all source files, and clang-tidy checking them in a single thread,
sequentially. clang-tidy offers a `run-clang-tidy` Python script for
parallel  processing, which may help with this. However at this point
it's more practical to use cmake, which also supports verifying the
whole codebase, not only lib and src.

Also:
- bump clang-tidy to the latest available, v20 (from v18).
- enable running clang-tidy on tests. Takes under 2 minutes.

Also tried `_CURL_TESTS_CONCAT=ON`, it brings down the build tests step
from 1m47s to 54s, saving 1 minute. Skipped using it for now.

Closes #20725

6 weeks agoclang-tidy: enable scanning headers
Viktor Szakats [Wed, 25 Feb 2026 14:01:47 +0000 (15:01 +0100)] 
clang-tidy: enable scanning headers

By setting `HeaderFilterRegex: '.*'`.

Closes #20720

6 weeks agounit3205: suppress two clang-tidy false positives
Viktor Szakats [Thu, 26 Feb 2026 02:56:36 +0000 (03:56 +0100)] 
unit3205: suppress two clang-tidy false positives

Silencing:
```
tests/unit/unit3205.c:565:32: error: the result from calling 'memcpy' is not null-terminated [bugprone-not-null-terminated-result]
  565 |         expect = (const char *)memcpy(alt, "DHE-", 4);
      |                                ^~~~~~            ~~~
      |                                strcpy
tests/unit/unit3205.c:569:32: error: the result from calling 'memcpy' is not null-terminated [bugprone-not-null-terminated-result]
  569 |         expect = (const char *)memcpy(alt + 4, "DHE-", 4) - 4;
      |                                ^~~~~~                ~~~
      |                                strcpy
```
Ref: https://github.com/curl/curl/actions/runs/22425366818/job/64932197466?pr=20725

Cherry-picked from #20725

Closes #20731

6 weeks agotests/server: fix to clear the complete `srvr_sockaddr_union_t` variable
Viktor Szakats [Thu, 26 Feb 2026 02:28:17 +0000 (03:28 +0100)] 
tests/server: fix to clear the complete `srvr_sockaddr_union_t` variable

Reported by clang-tidy (seen on Linux with v18, v19, v20, not on macOS):
```
tests/server/dnsd.c:552:14: error: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
tests/server/dnsd.c:556:14: error: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
tests/server/rtspd.c:1183:14: error: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
tests/server/rtspd.c:1187:14: error: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
tests/server/sws.c:2235:14: error: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
tests/server/sws.c:2239:14: error: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
tests/server/tftpd.c:1188:14: error: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
tests/server/tftpd.c:1192:14: error: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
tests/server/util.c:860:21: error: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
tests/server/util.c:864:21: error: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage]
```
Ref: https://github.com/curl/curl/actions/runs/22424827575/job/64930560425?pr=20725

Cherry-picked from #20725

Closes #20730

6 weeks agobuild: add missing `GENERATEDCERTS` files
Viktor Szakats [Thu, 26 Feb 2026 01:45:52 +0000 (02:45 +0100)] 
build: add missing `GENERATEDCERTS` files

Also alpha sort lists, while here.

Follow-up to 2cf19c245eff8ff84e53d6edc27d36bf25439d1b #17493

Closes #20728

6 weeks agocmake: minor fixes to test targets after prev
Viktor Szakats [Thu, 26 Feb 2026 01:11:36 +0000 (02:11 +0100)] 
cmake: minor fixes to test targets after prev

- run tests-clang-tidy when building testbins.
- drop redundant build-certs dependency for test targets.
  Already present via testdeps.

Follow-up to aae361242f30eafacf46085ed731b1524bfd3be9 #20708

Closes #20727

6 weeks agobuild: do not include wolfSSL header in `curl_setup.h`
Viktor Szakats [Wed, 25 Feb 2026 19:55:03 +0000 (20:55 +0100)] 
build: do not include wolfSSL header in `curl_setup.h`

To fix building tests/server with cmake and both wolfSSL and OpenSSL
enabled (MultiSSL).

tests/server do not have libcurl dependency header paths setup because
it does not use libcurl. The code however includes `curl_setup.h`, which
tried including `wolfssl/version.h` before this patch to verify if the
wolfSSL coexist feature is available. Without a header path, it failed:
```
In file included from bld/tests/server/servers.c:3:
In file included from tests/server/first.h:40:
lib/curl_setup.h:737:12: fatal error: 'wolfssl/version.h' file not found
  737 | #  include <wolfssl/version.h>
      |            ^~~~~~~~~~~~~~~~~~~
1 error generated.
```
Ref: https://github.com/curl/curl/actions/runs/22410066319/job/64880787424#step:46:76

Fix by moving the include and version check to `vtls/wolfssl.c`.

Also: add an early version check to cmake.

Follow-up to 16f073ef49f94412000218c9f6ad04e3fd7e4d01 #16973
Cherry-picked from #20720

Closes #20726

6 weeks agocmake: replace internal option with a new `testbins` target
Viktor Szakats [Tue, 24 Feb 2026 00:35:02 +0000 (01:35 +0100)] 
cmake: replace internal option with a new `testbins` target

To allow building test binaries without test certs, replacing
`_CURL_SKIP_BUILD_CERTS` internal option with a build target that is
similar to `testdeps`, but without building the test certificates.

To make building test binaries a little bit faster, with less noisy
output, and without having to reconfigure the build.

Closes #20708

6 weeks agocmake: fix passing system header directories to clang-tidy for tests
Viktor Szakats [Wed, 25 Feb 2026 17:18:02 +0000 (18:18 +0100)] 
cmake: fix passing system header directories to clang-tidy for tests

Pass system directories with `-isystem` to avoid clang-tidy parsing
3rd-party and system headers with `HeaderFilterRegex: '.*' enabled.

Also:
- drop rule exception no longer necessary.
- sync normal vs. system header path order with compiler invocation.
- tidy up `set()` syntax.
- clear a temporary variable.

Bug: https://github.com/curl/curl/pull/20670#issuecomment-3940840176
Follow-up to e088e104549421914da9170eeead72a43d42c028 #17705
Cherry-picked from: #20720

Closes #20724

6 weeks agoclang-tidy: avoid/silence `bugprone-not-null-terminated-result`
Viktor Szakats [Wed, 25 Feb 2026 17:32:14 +0000 (18:32 +0100)] 
clang-tidy: avoid/silence `bugprone-not-null-terminated-result`

Prefer `sizeof()` over `strlen()`, static const variables over macros.
Add a couple of `NOLINT`s to silence false positives.

Also sync similar code patterns between libtests.

Cherry-picked from #20720

Closes #20723

6 weeks agocmake: add native clang-tidy support for tests, with concatenated sources
Viktor Szakats [Sat, 21 Feb 2026 01:44:42 +0000 (02:44 +0100)] 
cmake: add native clang-tidy support for tests, with concatenated sources

Tests are build in "unity"-style, by including sources into an umbrella
C files (similar to how CMake unity works). This does not play well with
clang-tidy, which seems to unconditionally ignore C sources included
like this. To fix it, curl's CMake implements a manual clang-tidy
support for tests, which  compiles sources one-by-one, while also making
sure sources compile cleanly standalone (e.g. all sources need to
include `first.h`). The manual clang-tidy implementation is fragile, and
performance, in particular when targeting Windows, is abysmal.

This patch introduces an alternate solution, enabled by the
`_CURL_TESTS_CONCAT=ON` option. In this mode, umbrella sources include
the actual sources instead of `#including` them. Allowing to use CMake's
built-in clang-tidy support to compile them, with clang-tidy actually
checking the sources. Making the manual clang-tidy support unnecessary.
In the Windows CI job it results in a 4x performance improvement (4m ->
1m), making it practical to run clang-tidy on tests on Windows, in CI.

The main downside is that clang-tidy doesn't understand the `#line`
directive. Meaning issues found show the wrong filename and line number
next to them. It's not impossible to locate errors this way, but also
not convenient.

Minor/potential downside is that the concatenated source needs to be
reassembled each time an original source is updated. This may result in
more copying on the disk when used in local development. The largest
source is 1.4MB, so probably not a show-stopper on most machines.

Another is the complexity of maintaining two methods in parallel, which
may be necessary till clang-tidy understands `#line`:
https://github.com/llvm/llvm-project/issues/62405

This solution may in theory also enable adding clang-tidy support for
tests in autotools, though I haven't tried.

Targeted for curl CI for now, and used in a GHA/windows job. 100%
experimental, not recommended outside these.

Closes #20667

6 weeks agoclang-tidy: add more missing parentheses in macro values
Viktor Szakats [Wed, 25 Feb 2026 14:06:27 +0000 (15:06 +0100)] 
clang-tidy: add more missing parentheses in macro values

Reported when running `HeaderFilterRegex: '.*'` in CI.

Also replace an underscored symbol with a regular one in macro
definition.

Cherry-picked from #20720

Closes #20721