Commit Graph

36004 Commits

Author SHA1 Message Date
Daniel Stenberg
6654e770ce
KNOWN_BUGS: 10.2 Does not acknowledge getaddrinfo sorting policy
Closes #16718
Closes #17861
2025-07-08 13:01:33 +02:00
Eshan Kelkar
ac8271d020
libssh: fix readdir issues
Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com>
Closes #17856
2025-07-08 12:43:09 +02:00
Stefan Eissing
b270fec68d
quiche: fix missing include of url.h
Reported-by: Karthik Dasari
Fixes #17857
Closes #17858
2025-07-08 11:07:39 +02:00
Daniel Stenberg
8724306e78
runtests: support memory-limits per test
The idea here is to set limits per test how many allocations and maximum
amount of memory it is allowed to use. This is a means to make sure the
number and total size of allocations are kept in check and don't
mistakenly "blow up".

If runtests.pl detects that the given limits have been exceeded it fails
the test case with an error.

The `<verify>` part now supports `<limits>`, and in this section two
limits can be set for each test (verified in debug builds only):

    Allocations: [number of allocation calls]
    Maximum allocated: [maximum concurrent memory allocated]

Default limits (used if nothing is set in the test file):

    Allocations: 1000
    Maximum allocated: 1000000

Closes #17821
2025-07-08 10:14:45 +02:00
renovate[bot]
4188db5db9
GHA: update dependency cloudflare/quiche to v0.24.4
Closes #17849
2025-07-07 19:25:24 +02:00
renovate[bot]
131cdf62b6
GHA: update dependency nghttp2/nghttp2 to v1.66.0
Closes #17850
2025-07-07 19:20:15 +02:00
renovate[bot]
dc966098cf
GHA: update dependency awslabs/aws-lc to v1.55.0
Closes #17847
2025-07-07 19:20:15 +02:00
renovate[bot]
6959853e03
GHA: update dependency Mbed-TLS/mbedtls to v3.6.4
Closes #17846
2025-07-07 19:20:15 +02:00
Viktor Szakats
27b8377220
GHA/distcheck: add missing timeout, reduce existing
Also hung around an `apt update`:
https://github.com/curl/curl/actions/runs/16121486815/job/45488127176?pr=17847

Closes #17853
2025-07-07 19:20:15 +02:00
Viktor Szakats
3aecfa927c
GHA/curl-for-win: reduce job timeout to 10m, apply to Windows jobs
The timeout was missing from two Windows jobs, making them linger for
a long time due to a command waiting forever.

As seen today with/after `apt update`:
https://github.com/curl/curl/actions/runs/16121485403/job/45488122962?pr=17846

Closes #17852
2025-07-07 19:03:00 +02:00
Viktor Szakats
9ff2127105
CI: sync curl download command-line options
- circleci: pipe to tar.
- use long options uniformly.
- sync option order.
- set timeout where missing.
- set retry where missing.
- set `--retry-connrefused` where missing.
- set `--disable` where missing.
- lower 999s timeouts to 120s.

Closes #17851
2025-07-07 17:34:47 +02:00
Viktor Szakats
067bc8ee2d
GHA/linux: fix output in download-decompress commands
Regression from 17a669426f #17537

Closes #17848
2025-07-07 16:28:56 +02:00
Viktor Szakats
172ca3bba9
memory: tidy up _tcsdup() override
Follow-up to ef2ccf862f #17840
Closes #17845
2025-07-07 15:32:15 +02:00
Daniel Stenberg
b5c531b09e
renovate.json: fix patterns for OpenSSL, QuicTLS and generic
Follow-up to 17a669426f

Closes #17842
2025-07-07 15:23:57 +02:00
Viktor Szakats
ef2ccf862f
memory: stop overriding unused wcsdup()/_wcsdup() system functions
Also ban them via `checksrc`.

The code continues to use `_tcsdup()`.

Assisted-by: Daniel Stenberg

Closes #17840
2025-07-07 15:03:31 +02:00
renovate[bot]
7ae44fa9b9
GHA: update cygwin/cygwin-install-action version number to v6
Existing hash received a release tag.

Follow-up to 4c20eb7108 #17118
Closes #17844
2025-07-07 14:39:10 +02:00
Christian Hesse
7d73c712f0
curl.h: make CURL_IPRESOLVE_* symbols defined as longs
... as `curl_easy_setopt()` expects them to be.

Also remove some casting workarounds.

Closes #17790
2025-07-07 14:37:12 +02:00
Daniel Stenberg
91e8be7fc2
GHA: bump OpenSSL to 3.5.1
Closes #17841
2025-07-07 13:36:48 +02:00
Daniel Stenberg
f048546c87
libssh2: remove use of 'initialised' for cleanup
It could previously cause a memory-leak when the cleanup was not
performed because it was not set.

Reported-by: albrechtd on github
Fixes #17819
Closes #17837
2025-07-07 12:01:22 +02:00
Daniel Stenberg
22bd59fb7f
RELEASE-NOTES: synced 2025-07-07 09:35:19 +02:00
Carlos Henrique Lima Melara
790153c927
docs,tests: fix english grammar "allow to" -> "allow <something> to"
This was spotted by Debian's lintian tool. It adds an informational
warning at every run, so my OCD was kicking in and I had to fix it :-)

Closes #17787
2025-07-07 09:05:17 +02:00
Stefan Eissing
51f933801e
scorecard: flame graphs and documentation
Add `--flame` option to scorecard.py for generating flame graphs.
Add documentation in docs/internal/SCORECARD.md on how to use this.

Closes #17792
2025-07-07 09:04:22 +02:00
Stefan Eissing
4ccf3a31f5
ngtcp2: fix coverity warning about result handling
Closes #17783
2025-07-07 08:58:46 +02:00
Viktor Szakats
c97a8f07d5
GHA/curl-for-win: enable unity batches to improve build perf
Job                 | Before |  After |
:------------------ | -----: | -----: |
Linux gcc glibc     |  4m44s |  4m13s |
Linux llvm MUSL     |  4m17s |  4m00s |
macOS clang         |  1m59s |  1m54s |
Windows llvm        |  3m56s |  3m18s |
Windows gcc ... x86 |  3m26s |  3m11s |

Before: https://github.com/curl/curl/actions/runs/16101989848
After: https://github.com/curl/curl/actions/runs/16102353747?pr=17836

Closes #17836
2025-07-07 01:44:47 +02:00
Stefan Eissing
2db8ae480f
quic: implement CURLINFO_TLS_SSL_PTR
Replace the old Curl_ssl_get_internals() with a new connection filter
query to retrieve the information. Implement that filter query for TCP
and QUIC TLS filter types.

Add tests in client tls_session_reuse to use the info option and check
that pointers are returned.

Reported-by: Larry Campbell
Fixes #17801
Closes #17809
2025-07-06 20:29:54 +02:00
Daniel Stenberg
81693c77be
unit3214: verify struct sizes
This test makes sure that a number of internal and public structs are
within their maximum allowed size limits.

The public structs can only grow in controlled ways, while the internal
ones may be allowed to grow if deemed right.

The idea here is to control, to know and make sure all important struct
growth is intentional.

Closes #17823
2025-07-06 20:28:21 +02:00
Viktor Szakats
05263820e5
memdebug.h: eliminate global macro CURL_MT_LOGFNAME_BUFSIZE
It had a single use in `src/tool_main.c`. Replace with a literal and
`sizeof()`s.

Follow-up to aaab5fa299
Cherry-picked from #17827
Closes #17833
2025-07-06 20:08:58 +02:00
Viktor Szakats
26f3ee25a4
ws: drop redundant CURL_EXTERN from function definitions
Cherry-picked from #17827
Closes #17832
2025-07-06 20:08:58 +02:00
Viktor Szakats
9e17d281bf
curl_memory.h: fix to undefine accept4
Follow-up to 3d02872be7 #16979
Cherry-picked from #17827
Closes #17831
2025-07-06 20:08:58 +02:00
Viktor Szakats
cbf261e2de
rustls: apply memory function overrides, fixing an ECH buffer free
Fixing:

- a raw `free()` in ECH code that's malloced in lib code, causing
  an invalid free, also reported by valgrind (in non-unity builds).

  And in unity builds adjusted to behave like non-unity via #17827:
  Ref: https://github.com/curl/curl/actions/runs/16093372427/job/45421778472?pr=17827#step:39:3321

- a local pair of `malloc()`/`free()` to use curl's memory allocators,
  and participate in memory tracking when enabled.

Cherry-picked from #17827
Closes #17830
2025-07-06 20:08:58 +02:00
Viktor Szakats
822e47cdce
memdebug.h: #undef fclose before defining it
Just in case, and to match the pattern used for similar redefines.

Cherry-picked from #17827
2025-07-06 19:58:04 +02:00
Viktor Szakats
ed3a482cd1
memdebug.h: fix whitespace/indentation
Cherry-picked from #17827
2025-07-06 19:57:22 +02:00
Daniel Stenberg
beb64e6f3f
tests: make all names < 75 characters long
- no need to make them long and complicated
- increases the chances of them looking better in terminal outputs

Closes #17824
2025-07-06 10:56:08 +02:00
Daniel Stenberg
9b61f81149
tests/http/requirements: remove multipart
This is not actually used.

Reported-by: defnull
URL: https://chaos.social/@defnull/114801392456999379

Closes #17825
2025-07-05 18:13:29 +02:00
Patrick Monnerat
a1449aa704
os400: upgrade ILE/RPG bindings with latest definitions.
Closes #17822
2025-07-05 11:59:42 +02:00
Viktor Szakats
e54c80b397
cmake: curl_add_clang_tidy_test_target tidy-ups
- simplify gathering header directories and compiler definitions
  recursively.

- handle the case when the cmake directory object doesn't define header
  directories or compiler definitions.

- honor more corners cases:
  - `INTERFACE_INCLUDE_DIRECTORIES` of the initial target.
  - handle no header directory for initial target.

- de-duplicate header directories and compiler redefinitions to mimic
  CMake.

- drop unnecessary `unset()`s.

Note that the order of header directories remains different compared to
how CMake passes them to the compiler when building tests. The order is
already different in the test target `INCLUDE_DIRECTORIES` property,
preventing to reproduce the exact CMake order. The distinction between
`-I` and `-isystem` is also missing from target properties.

Cherry-picked from #17768

Closes #17814
2025-07-05 00:40:32 +02:00
Viktor Szakats
5af2457848
lib: fix unused parameter/function compiler warnings
- hostip: fix unused variable with `CURL_DISABLE_SHUFFLE_DNS`
  ```
  lib/hostip.c: In function 'Curl_dnscache_mk_entry':
  lib/hostip.c:490:42: warning: unused parameter 'data' [-Wunused-parameter]
    490 | Curl_dnscache_mk_entry(struct Curl_easy *data,
        |                        ~~~~~~~~~~~~~~~~~~^~~~
  ```

- setopt: fix unused function with `CURL_DISABLE_HTTP`
  ```
  lib/setopt.c:214:17: warning: 'httpauth' defined but not used [-Wunused-function]
    214 | static CURLcode httpauth(struct Curl_easy *data, bool proxy,
        |                 ^~~~~~~~
  ```

- url: fix unused function with `CURL_DISABLE_NETRC`
  ```
  lib/url.c:2760:13: warning: 'str_has_ctrl' defined but not used [-Wunused-function]
   2760 | static bool str_has_ctrl(const char *input)
        |             ^~~~~~~~~~~~
  ```

Seen with a minimal curl-for-win build:
```
CW_CONFIG=dev-x64-zero-osnotls-osnoidn-nohttp-nocurltool-linux-unity
```

Closes #17818
2025-07-04 16:46:53 +02:00
Daniel Stenberg
7e2bdd8662
RELEASE-NOTES: synced 2025-07-04 12:58:03 +02:00
Stefan Eissing
d9c2d4bc10
docs: warn about lifetime in CURLOPT_CLOSESOCKET*
Callback and data set via CURLOPT_CLOSESOCKETFUNCTION and
CURLOPT_CLOSESOCKETDATA may get used after the easy handle has been
cleaned up. Inform about that.

Closes #17816
2025-07-04 12:55:26 +02:00
Daniel Stenberg
bed49a0462
test1499: verify two chunked responses on reused connection
It triggered a memory leak back in 7.88.1

Closes #17815
2025-07-04 11:23:25 +02:00
Piotr Nakraszewicz
e022da0e83
openssl: fix pkcs11 provider available check
Commit f2ce6c46 among other things added the use of own library context
instead of the default context. Default context has access to OpenSSL
configuration file, own context doesn't have it.
Therefore if a pkcs11 provider is loaded via config file, the function
OSSL_PROVIDER_available() incorrectly detects the provider as
unavailable.

Fix this by loading the OpenSSL config to the library context according
to OpenSSL documentation:
"OSSL_LIB_CTX_load_config() loads a configuration file using the given
ctx. This can be used to associate a library context with providers that
are loaded from a configuration."

Moreover use the provider_loaded flag instead of provider pointer to
determine if a provider is available, as the latter is not set when the
provider is loaded from a configuration.

Closes #17804
2025-07-04 08:28:46 +02:00
Viktor Szakats
42fdc65a98
cmake: fix curl_add_clang_tidy_test_target when no -D option
Fix `curl_add_clang_tidy_test_target` generating an invalid option for
`clang-tidy` if the tested target has no custom macro definition.

Current build doesn't hit this case, but a pending PR does.

Fixing:
```
[...] -Ilib -Itests/client -DCURL_HIDDEN_SYMBOLS -DHAVE_CONFIG_H -D_definitions_t-NOTFOUND
```
error: ISO C99 requires whitespace after the macro name [clang-diagnostic-c99-extensions,-warnings-as-errors]

Cherry-picked from #17768
Closes #17813
2025-07-04 06:28:40 +02:00
Viktor Szakats
b2c9e5ea10
cmake: gather options recursively in curl_add_clang_tidy_test_target
Also look into `INTERFACE_INCLUDE_DIRECTORIES` target properties
for include directories.

Ref: #16973

Closes #17812
2025-07-04 05:57:33 +02:00
Viktor Szakats
5fb10b5476
tool1621: drop unused internal libcurl headers
Closes #17811
2025-07-04 05:48:30 +02:00
Viktor Szakats
7ad985cad5
tests/unit: hook up unitprotos to the units-clang-tidy target
To make `ninja units-clang-tidy` target work without manually building
core components first.

Also rename the clang-tidy test target generator macro to align its name
with the built-in `add_custom_target()` function.

Follow-up to c9bb9cd165 #17750

Closes #17810
2025-07-03 23:49:25 +02:00
Viktor Szakats
a88907fd96
cmake/FindGSS: initialize result variables
Also rename `_GSS*` local variables to `_gss*` to please `clang-lint`,
which emitted new warnings after adding the initializations.

Ref: https://github.com/curl/curl/issues/17802#issuecomment-3029455984

Closes #17806
2025-07-03 17:51:51 +02:00
Viktor Szakats
24c91d999e
cmake/FindGSS: fix processing C header path options
When processing `--cflags` received from `krb5-config` for `gssapi`:

- fix to not break on multiple `-I` options. Before this patch only
  the first `-I` option was processed as a header directory, subsequent
  ones ended up in C flags as a raw directory, without the `-I` arg.
  Follow-up to 558814e16d

- fix to not duplicate C flags.
  Regression from 146759716c #14430

- drop local variable `_val` by re-using `_flag`.

- tidy up comments.

Ref: https://github.com/curl/curl/issues/17802#issuecomment-3029455984

Closes #17805
2025-07-03 13:50:20 +02:00
Dan Fandrich
ab667c73a4 CI: skip CI builds that just touch Dockerfile
This file sees regular updates but isn't used by any CI build.
2025-07-02 18:28:24 -07:00
Jay Satiro
cd9d791651 CURLSHOPT_SHARE.md: mention multi-threading requires callbacks
- Explain that if data is shared in multiple threads then the user must
  set mutex callbacks.

Reported-by: afengsoft@users.noreply.github.com

Fixes https://github.com/curl/curl/issues/17774
Closes https://github.com/curl/curl/pull/17782
2025-07-02 11:11:25 -04:00
Daniel Stenberg
dc263e15e1
VULN-DISCLOSURE-POLICY: minor language polish
Closes #17799
2025-07-01 22:54:43 +02:00