multi: silence gcc 16 -Wnull-dereference, bump CI job to test#21707
Closed
vszakats wants to merge 6 commits into
Closed
multi: silence gcc 16 -Wnull-dereference, bump CI job to test#21707vszakats wants to merge 6 commits into
-Wnull-dereference, bump CI job to test#21707vszakats wants to merge 6 commits into
Conversation
db1835b to
6b8afd8
Compare
```
In file included from D:/a/curl/curl/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:259:
In function 'multi_ischanged',
inlined from 'multi_socket.isra' at D:/a/curl/curl/lib/multi.c:3282:6:
D:/a/curl/curl/lib/multi.c:1710:17: error: null pointer dereference [-Werror=null-dereference]
1710 | bool retval = (bool)multi->recheckstate;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
D:/a/curl/curl/lib/multi.c:1712:25: error: null pointer dereference [-Werror=null-dereference]
1712 | multi->recheckstate = FALSE;
| ^
```
https://github.com/curl/curl/actions/runs/26217071531/job/77142119137?pr=21707
```
In function 'Curl_multi_xfers_running',
inlined from 'multi_socket.isra' at ../../lib/multi.c:3292:28:
../../lib/multi.c:4132:15: error: null pointer dereference [-Werror=null-dereference]
4132 | return multi->xfers_alive;
| ~~~~~^~~~~~~~~~~~~
```
https://github.com/curl/curl/actions/runs/26218822231/job/77148186045
-Wnull-dereference, bump CI job to test
There was a problem hiding this comment.
Pull request overview
This PR updates libcurl’s multi interface implementation and Windows CI to address GCC -Wnull-dereference warnings (treated as errors) and to ensure CI exercises the newer compiler/toolchain where the warnings occur.
Changes:
- Guard
multi_ischanged()andCurl_multi_xfers_running()against NULL to silence GCC-Wnull-dereference, and addDEBUGASSERT(multi)in both. - Bump the Windows “dl-mingw” CI job toolchain to w64devkit v2.8.0 / GCC 16.1.0.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
lib/multi.c |
Adds DEBUGASSERT and NULL guards to silence GCC null-dereference warnings in inlined multi codepaths. |
.github/workflows/windows.yml |
Updates the w64devkit download/version/SHA used by the dl-mingw job to test with GCC 16. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
outcast36
pushed a commit
to greearb/curl
that referenced
this pull request
Jun 3, 2026
- GHA/windows: bump dl-mingw job from gcc 15 to 16.
- multi: silence warning while building libcurlu:
```
In function 'multi_ischanged',
inlined from 'multi_socket.isra' at D:/a/curl/curl/lib/multi.c:3282:6:
D:/a/curl/curl/lib/multi.c:1710:17: error: null pointer dereference [-Werror=null-dereference]
1710 | bool retval = (bool)multi->recheckstate;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
D:/a/curl/curl/lib/multi.c:1712:25: error: null pointer dereference [-Werror=null-dereference]
1712 | multi->recheckstate = FALSE;
| ^
```
Ref: https://github.com/curl/curl/actions/runs/26217071531/job/77142119137?pr=21707
- multi: silence another `-Wnull-dereference`, popping up in libcurl
with gcc 13 after the previous silencing:
```
In function 'Curl_multi_xfers_running',
inlined from 'multi_socket.isra' at ../../lib/multi.c:3292:28:
../../lib/multi.c:4132:15: error: null pointer dereference [-Werror=null-dereference]
4132 | return multi->xfers_alive;
| ~~~~~^~~~~~~~~~~~~
```
Ref: https://github.com/curl/curl/actions/runs/26218822231/job/77148186045
- multi: also add `DEBUGASSERT(multi)` to the two updated functions.
Closes curl#21707
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
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.
GHA/windows: bump dl-mingw job from gcc 15 to 16.
multi: silence warning while building libcurlu:
Ref: https://github.com/curl/curl/actions/runs/26217071531/job/77142119137?pr=21707
multi: silence another
-Wnull-dereference, popping up in libcurlwith gcc 13 after the previous silencing:
Ref: https://github.com/curl/curl/actions/runs/26218822231/job/77148186045
multi: also add
DEBUGASSERT(multi)to the two updated functions.