-
Notifications
You must be signed in to change notification settings - Fork 1
[pull] master from curl:master #349
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since this is only used for object and function pointers now. Closes #16709
CODEx, DATAx, CLEANx, DECLx, REM3, CHKRET are all removed now. Closes #16709
The condition could not happen, as the function is only called from a single place where the caller already made sure it can't happen. This change still removes the flawed logic. Reported-by: Ronald Crane Closes #16710
Allowing 4GB on a 32-bit system is just asking for problems and could in theory cause integer overflow in the dynbuf code. The dynbuf now has an assert to catch code trying to set a max larger than half SIZE_T_MAX. Reported-by: Rinku Das Closes #16716
When committed in 2004, it served as a developer helper tool while `coreutils` was yet missing a `base64` command. Assisted-by: Dan Fandrich Closes #16713
Sync it with cmake to: - exclude it from all builds except Windows and Cygwin. - exclude it from unity builds for Cygwin to avoid the included `windows.h` header interfere with the rest of the code. Also: - fix to trim ending spaces from `CSOURCES` for the `tidy` target. The solution requires a non-POSIX `-E` `sed` option. Supported by BSD and GNU implementations. Follow-up to 37523c9 #16480 Follow-up to 60c3d04 #14815 Follow-up to 7860f57 #12408 Closes #16712
Use a more descriptive global variable name in server code, also to avoid colliding with this name used elsewhere in libcurl. This isn't causing an issue at this time, but makes the code prone to `-Wshadow` warnings in unity mode, if the global variable is compiled first. This specific variable could collide with the `path` argument of the `curlx_win32_stat()` function. Closes #16719
It seems unnecessary and possibly unexpected to build test servers with debug-enabled features and memory tracking whenever the tested curl is built like that (which is a requirement for some tests, so curl is mostly built like that when running tests.) It also makes building servers a little bit faster with cmake for the most common cases. You can apply debug options to `tests/server` with these new options: - `./configure`: `--enable-server-debug`. - cmake: `-DENABLE_SERVER_DEBUG`. Also sync the way we pass these macros in autotools, with CMake builds. Before this patch, autotools passed them via `curl_config.h`. After this patch it passes them on the command-line, like cmake builds do. This patch also make these option no longer passed to examples and `http/client` in cmake builds, where they were no-ops anyway. Ref: #15000 Closes #16705
Before this patch, autotools builds excluded TrackMemory sources (`lib/memdebug.c` and `lib/curl_multibyte.c`) based on the `DEBUGBUILD` setting. This works in most cases because its value is the same as `CURLDEBUG` by default, but the correct condition is `CURLDEBUG`. It should fix `--disable-debug --enable-curldebug --enable-unity` builds. (not tested in CI) It also syncs behavior with cmake builds. Ref: #16705 Closes #16723
Follow-up to 00fc556 Ref: #16716 (comment) > I have some tooling leftover from when I was implementing CRL support > in the webpki crate that downloaded every CRL I could find referenced > in ccadb (without doing any special filtering for defunct CAs/CRLs > mind you) and found CRLs that spanned the range from very small > (<1mb), to medium sized (11 .. 22mb) to very large (100mb). Reported-by: Daniel McCarney Closes #16724
By allocating the method string as part of the struct, the previous fixed size limit (23 bytes) can be avoided. It would previously make "curl -X [long string]" work against http://localhost but fail against https://curl.se with no clear error message. Closes #16729
It saves about 1 minute (10%) per run. Also reduces log length from 3800 to 2800 lines. Keep building docs on native CPU. Closes #16731
Fix the broken implementation to have `data->state` carry pointers into connectdata members. Always dup the memory and free when easy handle closes. Closes #16733
seen with mingw-w64 gcc 14.2.0 while playing with other modifications: ``` lib/asyn-thread.c: In function 'init_resolve_thread': lib/asyn-thread.c:447:5: warning: 'free' called on pointer 'data' with nonzero offset 3264 [-Wfree-nonheap-object] 447 | free(td); | ^~~~~~~~ ``` Where `td` is: ```c struct thread_data *td = &data->state.async.thdata; ``` Follow-up to d9fc64d #16241 Closes #16734
- `NOT` + `VERSION_LESS` -> `VERSION_GREATER_EQUAL` Available since 3.7, which is the minimum required for curl: https://cmake.org/cmake/help/latest/command/if.html#version-greater-equal - make `CMAKE_REQUIRED_*` argument quotes consistent. - make `CMAKE_REQUIRED_*` space alignment consistent. - drop quote from version value for consistency with other cases. - formatting Closes #17002
Since we start the server on our own port we know the server running is us. By removing unnecessary verification we speed up tests a little. Closes #17005
And also require HTTP. Also add `IPv6` to the keywords. Fixing: Linux AM openssl !ipv6 !--libcurl: ``` FAIL 1265: 'NO_PROXY with IPv6 numerical address' HTTP, HTTP proxy, http_proxy, NO_PROXY, noproxy FAIL 1324: 'HTTP with --resolve and [ipv6address]' HTTP, HTTP GET, --resolve FAIL 2086: 'Pre-request callback for HTTP IPv6' HTTP, IPv6 ``` Ref: https://github.com/curl/curl/actions/runs/14378524385/job/40318328714?pr=17012#step:41:3789 Follow-up to a09e491 #17005 Closes #17014
Add workaround for an issue related to the gcc "hacklayer" after the GitHub macos-15-arm64 runner bumped to 20250408.1231. Fixes: ``` configure:5175: gcc-13 -o conftest --sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -w conftest.c >&5 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/_stdio.h:71, from /opt/homebrew/Cellar/gcc@13/13.3.0/lib/gcc/13/gcc/aarch64-apple-darwin24/13/include-fixed/stdio.h:75, from conftest.c:9: /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/_stdio.h: In function 'fmemopen': /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/_stdio.h:457:107: error: expected declaration specifiers before '__API_AVAILABLE_GET_MACRO_93585900' 457 | FILE *fmemopen(void * __restrict __buf _LIBC_SIZE(__size), size_t __size, const char * __restrict __mode) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)); | ^~~~~~~~~~~~~~~ ``` Ref: https://github.com/curl/curl/actions/runs/14378524390/job/40316589059?pr=17012#step:7:169 Assisted-by: Bo Anderson Bug: #17012 (comment) Bug: Homebrew/homebrew-core#194778 (comment) Closes #17017
Found by improving verify-examples.pl: - Operate directly on markdown files to remove the need to render nroff files first. - Add -Wall as a compiler option to find more issues Closes #17028
It is probably an unintentionally bad setup. Found-by: Stefan Eissing Closes #17025
Though cmake finds nghttp3 by pkg-config, nghttp3 isn't linked properly. Because library directory is not given by -L. Closes #17010
- to benefit from the new download retry mechanism. cygwin/cygwin-install-action#26 - to use a new setting that not only moves the Cygwin install target directory to the faster `D:` drive, but also the package download directory. Expecting a little performance improvement from this for the Cygwin install step. cygwin/cygwin-install-action@d3a7464 cygwin/cygwin-install-action#27 Closes #17040
On the windows-2022 runner it installs these client/server versions: ``` ssh client found /c/Windows/System32/OpenSSH/ssh.exe is OpenSSH-Windows 9.5.0 ssh server found /c/Windows/System32/OpenSSH/sshd.exe is OpenSSH-Windows 8.1.0 ``` Not currently enabled. Slight downside (when enabled) that Windows needs over 1 minute to install these two tiny programs. Closes #17046
To allow configuring paths styles for SCP and SFTP servers separately. - make `scp://` URLs use `%SCP_PWD` (was: `%SSH_PWD`). - make `%SCP_PWD` equal to `%POSIX_PWD`. To fix test 3022 with OpenSSH-Windows 9.8.0 server. The fix works on a local machine. Remains broken in CI. Before this patch, it was equal to `%FILE_PWD` when using OpenSSH-Windows, otherwise it was `%POSIX_PWD`. Notice that no matter what path-style we pass, test 3022 was and still is broken with earlier OpenSSH-Windows versions. (as tested with 9.5.0, 9.5.0-beta20240403, 8.0.0.1) - rename rest of `%SSH_PWD` uses to `%SFTP_PWD`. - drop unused `%POSIX_PWD`. - GHA/windows: test with OpenSSH-Windows server again. In the LibreSSL MSVC job. This job is short enough to fit the slow install of the built-in OpenSSH-Windows tools, if needed. Follow-up to 1abb087 #5298 Ref: #16803 Closes #17041
…ions Also: - pass `-D_GNU_SOURCE` via `COMPILE_DEFINITIONS`. - make it explicit to pass these C flags to feature checks. - update `_GNU_SOURCE` comment with `pipe2()`. - enable `-pedantic-errors` picky option for GCC with CMake <3.23. - drop redundant condition when stripping existing MSVC `/Wn` options. CMake passes `CMAKE_C_FLAGS` to targets, feature checks and raw `try_compile()` calls. With `COMPILE_OPTIONS`, this is limited to targets, and we must explicitly pass them to feature checks. This makes the build logic clearer, and offers more control. It also reduces log noise by omitting these options from linker commands, and from `CMAKE_C_FLAGS` dumps in feature checks. Closes #17047
In the hope this avoid a possible hang in `taskkill`. To kill processes, `runtests` first tries to kill them gently (with "TERM", or on Windows `taskkill`), then waits some time for them to disappear and then kills them with `KILL`, or on Windows with `taskkill -f`. This happens within `killpid()`. This patch bumps the gentle phase to `taskkill -f`. On the obervation that a non-forced `taskkill` may hang in cases: msvc, CM x64-windows wolfssl +examples: ``` [...] test 3006...[SMTP with multiple invalid (all) --mail-rcpt and --mail-rcpt-allowfails] --p----e--- OK (1682 out of 1718, remaining: 00:04, took 0.524s, duration: 03:13) test 3005...[SMTP with multiple and invalid (all but one) --mail-rcpt and --mail-rcpt-allowfails] --p-u--e-Executing: 'taskkill -t -pid 1196 >nul 2>&1' ``` Ref: https://github.com/curl/curl/actions/runs/14445993473/job/40508986059?pr=17051#step:15:4176 Cancelling the job worked, resulting in a greyed out status, with the above step and log entries lost. If this change causes issues or does nothing at all, we may revert it or limit it to CI runs. Ref: #14854 Closes #17054
Also: - drop unnecessary type conversion. `CMAKE_REQUIRED_FLAGS` is already space-separated. https://cmake.org/cmake/help/latest/module/CheckCSourceCompiles.html Follow-up to e865420 #17047 Closes #17055
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )