Commit Graph

35528 Commits

Author SHA1 Message Date
Viktor Szakats
368ba4e13f
tidy-up: drop redundant #ifdef before #undef
Closes #17899
2025-07-12 08:59:44 +02:00
Viktor Szakats
ddcfd2d511
tidy-up: whitespace (more in Perl)
Follow-up to 8eab2b7086 #17896
Cherry-picked from #17877
Closes #17901
2025-07-12 08:59:44 +02:00
Viktor Szakats
8eab2b7086
tidy-up: whitespace
Cherry-picked from #17877
Cherry-picked from #17876

Closes #17896
2025-07-11 13:32:54 +02:00
Viktor Szakats
202f0752ea
test1222: fix for out-of-tree and no-libcurl-manual builds
Before this patch this test succeeded silently and unconditionally,
when run on an out-of-tree curl build.

Also fix to exit gracefully if no libcurl manuals are found.

Fixing:
```
readline() on closed filehandle $m at ../../tests/test1222.pl line 153.
```

Cherry-picked from #17877
Closes #17892
2025-07-11 12:28:46 +02:00
Viktor Szakats
55509b045b
test1175: fix to run, and fix documentation issues detected
Fix test 1175 by passing the source root directory (was: tests).

Before this patch this caused silent Perl warnings and returning success
without executing the tests, due to:
```
readline() on closed filehandle $f at ../../tests/test1175.pl line 55.
readline() on closed filehandle $f at ../../tests/test1175.pl line 39.
```

Running the test revealed these issues:
```
CURLE_FUNCTION_NOT_FOUND is not in libcurl-errors.md
CURLE_HTTP_POST_ERROR is not in libcurl-errors.md
CURLE_TELNET_OPTION_SYNTAX is not in libcurl-errors.md
CURLM_CALL_MULTI_SOCKET is not in libcurl-errors.md
```

Apply fixes:
- mark `CURLE_FUNCTION_NOT_FOUND` deprecated by 7.53.0
- mark `CURLE_HTTP_POST_ERROR` deprecated by 7.56.0
- mark `CURLE_TELNET_OPTION_SYNTAX` deprecated by 7.78.0
- document `CURLM_CALL_MULTI_SOCKET` as a synonym for
  `CURLM_CALL_MULTI_PERFORM`
- test1477: exclude `CURLM_CALL_MULTI_SOCKET`.

But, these weren't officially deprecated. It may need more updates
to reflect that in other places, or fix the issues differently.

Follow-up to 66ec950004 #12424
Follow-up to 74f441c6d3 #4628

Cherry-picked from #17877
Closes #17880
2025-07-11 12:28:46 +02:00
Viktor Szakats
88ff396549
checksrc-all: rewrite in Perl, remove checksrc.bat
`checksrc.bat` was outdated and required Perl for `checksrc.pl` anyway.
Rewrite `checksrc-all.sh` in Perl, making it usable in envs without
a POSIX shell.

Closes #17882
2025-07-11 12:28:46 +02:00
Daniel Stenberg
f0b8137c1c
curl: remove the global argument from many functions
Since the config struct has a pointer to it, both pointers don't need to
be passed on.

Closes #17890
2025-07-10 23:28:31 +02:00
Daniel Stenberg
d516628d14
curl: unify pointer names to global config
Use 'config' for pointing to a OperationConfig

Use 'global' for pointing to GlobalConfig

Bonus: add config_alloc(), an easier way to allocate + init a new
OperationConfig struct.

Closes #17888
2025-07-10 18:23:17 +02:00
Stefan Eissing
695eee432f
h3: fix query of concurrent streams
Queries gave wrong value or ran into NULL pointers when called at
times when connection filter was not fully initialized.

Closes #17886
2025-07-10 17:29:54 +02:00
Stefan Eissing
74a94e699a
socks: fix query when filter context is null
socks connection filter context may be NULL at the time
of a query, accomodate for that.

Closes #17885
2025-07-10 17:28:49 +02:00
Stefan Eissing
51369ae78b
http2: fix var types in is_alive() implementations
Closes #17881
2025-07-10 10:47:04 +02:00
Daniel Stenberg
20ef31a751
projects/build-openssl.bat: remove
This is a script for building OpenSSL to be used with legacy Visual
Studio builds.

I don't think it is our job to provide nor maintain OpenSSL build
scripts.

Remove

Closes #17879
2025-07-10 10:28:01 +02:00
Viktor Szakats
7ed9dac2f9
libtests: more header tidy-ups
- make `test*` sources include `first.h`, like all others.
- drop redundant `curlx/*` includes after the above.
- merge `test.h` into `first.h`, now that no other file uses it.
  (and `first.h` had almost no content.)
  To simplify and sync header structure with other tests.

Closes #17875
2025-07-09 20:29:50 +02:00
Daniel Stenberg
897633eb21
docs: mention the as-is concept generically
for curl command line options and for curl_easy_setopt

Closes #17829
2025-07-09 15:32:46 +02:00
Viktor Szakats
a47695db33
test1499, 1599: use %LOGDIR
Fixing test 1599 also fixes these warnings in the test log:
```
Use of uninitialized value in join or string at /home/runner/work/curl/curl/tests/runner.pm line 774.
```
https://github.com/curl/curl/actions/runs/16157402085/job/45602590085?pr=17768#step:39:743

Assisted-by: Daniel Stenberg

Fixes #17871
Closes #17874
2025-07-09 13:52:18 +02:00
Viktor Szakats
7735cf8199
GHA/macos: adapt to macos-15 for upcoming macos-latest bump
macos-latest is soon to switch to macos-15. Make sure it keeps working.

Closes #17873
2025-07-09 13:52:18 +02:00
renovate[bot]
3163d0ac39
GHA: update dependency gnutls/gnutls to v3.8.10
Closes #17872
2025-07-09 13:52:17 +02:00
renovate[bot]
7ffb2cbf3e
renovate.json: migrate config to new format
Closes #17854
2025-07-09 10:40:36 +02:00
Daniel Stenberg
9990c14ba5
RELEASE-NOTES: synced 2025-07-09 10:32:26 +02:00
Viktor Szakats
784c17b7d9
tests: move curlcheck.h to libtest as unitcheck.h
To simplify dependencies, and sync tunits and units builds further.

`curlcheck.h` already depended on logic implemented within libtests:
it referenced a global variable (`unitfail`) defined in `first.c` and
declared in `test.h`.

Also:
- rename to `unitcheck.h` to indicate it's meant for unit tests.
- make `unitcheck.h` include `first.h` instead of `test.h`.
  This brings header use closer to libtests. It also includes
  `curlx/curlx.h` for all unit tests by default now.
- move `unitfail` declaration from `test.h` to `first.h`.
  To match its definition in `first.c`.
- drop now redundant per-test curlx header includes.

Closes #17868
2025-07-09 02:29:25 +02:00
Viktor Szakats
9db9137066
tests: fix 1301, 1308 to fail on error
They were using a macro designed for unit tests. It does not fail when
used in libtests. Make similar macros for these tests, and make them
return a failure.

Also:
- makes these two tests align with the rest of libtests, by including
  `first.h` instead of `curlcheck.h`.
- since libtests no longer need to depend on tests/unit, drop this
  dependency from build scripts.

Closes #17867
2025-07-09 00:55:28 +02:00
Karthik Dasari
454395ba1e
curl_osslq: fix missing include of url.h
Follow-up to 4ccf3a31f5 #17783
Follow-up to b270fec68d #17858
Ref: #17857
Closes #17864
2025-07-08 19:58:21 +02:00
Viktor Szakats
8afb623bdd
windows: drop redundant curl_wcsdup_callback callback
This callback was permanently mapped to libcurl's internal
`Curl_wcsdup()`, which always uses the customizable malloc for
allocation, thus making a custom mapping redundant anyway.

To simplify, drop the callback and map `_tcsdup()` in Unicode mode
directly to `Curl_wcsdup()`.

Also fixes:
- `curl_global_init()` which, before this patch, (re)initialized its
  mapping to `_wcsdup()`, returning buffers potentially incompatible
  with a custom allocator.
  Bug: https://github.com/curl/curl/pull/17840#issuecomment-3044361245
  Bug: https://github.com/curl/curl/pull/7540#issuecomment-2380995349
  Co-reported-by: Luca Kellermann

Follow-up to 76e047fc27 #7540
Assisted-by: Jay Satiro

Closes #17843
2025-07-08 13:33:38 +02:00
Stefan Eissing
fa0ed1fe4f
examples: beef up websocket.c
Make `docs/examples/websocket.c more complete by showing how to handle
CURLE_AGAIN return codes and incomplete sends.

Reported-by: Markus Unterwaditzer
Fixes #13288
Closes #17860
2025-07-08 13:06:27 +02:00
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