Conversation
🔒 Aisle Security Analysis✅ We scanned this PR and did not find any security vulnerabilities. Aisle supplements but does not replace security review. Analyzed PR: #20853 at commit Last updated on: 2026-03-08T16:50:57Z |
|
augment review |
There was a problem hiding this comment.
Pull request overview
This PR moves Windows RtlVerifyVersionInfo function-pointer resolution to global initialization time (instead of lazily on first curlx_verify_windows_version() call), aiming to avoid a potential race during first use.
Changes:
- Add
curlx_verify_windows_init()and cacheRtlVerifyVersionInfoin a file-scope static. - Invoke
curlx_verify_windows_init()andcurlx_now_init()fromCurl_win32_init(). - Remove the previous “one-time” lazy initialization logic from
curlx_verify_windows_version().
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/system_win32.c | Calls the new Windows-version init and centralizes QPC frequency init via curlx_now_init(). |
| lib/curlx/version_win32.h | Exposes curlx_verify_windows_init() (noop on UWP) for early initialization. |
| lib/curlx/version_win32.c | Implements early init + switches callers to use the cached s_pRtlVerifyVersionInfo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🤖 Augment PR SummarySummary: Moves Windows version-check initialization into Win32 global init to avoid potential first-use races when resolving Changes:
Technical Notes: Falls back to 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RtlVerifyVersionInfo address on global initRtlVerifyVersionInfo address on global init
Instead of the first internal call to `curlx_verify_windows_version()`. To avoid the chance of a race, potentially resulting in initializing this address twice. AFAICT it could not cause an issue before this patch. Reported by Codex Security Follow-up to b17ef87 curl#18009 Closes curl#20853
Instead of the first internal call to
curlx_verify_windows_version().To avoid the chance of a race, potentially resulting in initializing
this address twice. AFAICT it could not cause an issue before this
patch.
Reported by Codex Security
Follow-up to b17ef87 #18009
curlx_now_init()call #20852