Skip to content

Fix packaged Windows SDK LNK2019 (RtlSetVolatileMemory) in libcurl - #1960

Merged
AustinBenoit merged 2 commits into
mainfrom
fix/libcurl-windows-ntddi-version
Nov 10, 2026
Merged

AustinBenoit merged 2 commits into
mainfrom
fix/libcurl-windows-ntddi-version

Conversation

@AustinBenoit

Copy link
Copy Markdown
Contributor

Summary

When compiled against Windows SDK 10.0.26100.0+ (NTDDI_VERSION >= 0x0A000010), libcurl 8.23.0 switches its internal memory-zeroing macro to SecureZeroMemory2() (RtlSetVolatileMemory in volatileaccessu.lib), whose #pragma comment(lib, "volatileaccessu.lib") directive is stripped during SDK library packaging (causing LNK2019 on packaged Windows builds) and is unavailable to consumers using Windows 10 SDKs. Defining _WIN32_WINNT=0x0A00 and NTDDI_VERSION=0x0A000000 (NTDDI_WIN10) on libcurl targets baseline Windows 10+ so libcurl uses header-only SecureZeroMemory() instead while remaining fully compatible with both Windows 10 and Windows 11.

References

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates CMakeLists.txt to set Windows 10 baseline compile definitions (_WIN32_WINNT and NTDDI_VERSION) for libcurl targets when building with MSVC. The review feedback correctly points out that using an elseif block makes the configuration of libcurl_object and libcurl_static mutually exclusive; it is recommended to use independent if statements to ensure both targets are configured properly if they both exist.

Comment thread CMakeLists.txt Resolved
@AustinBenoit AustinBenoit added skip-release-notes Skip release notes check tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). labels Nov 10, 2026
@github-actions github-actions Bot added tests: in-progress This PR's integration tests are in progress. and removed tests-requested: full Trigger a FULL set of integration tests (uses expanded test matrix). labels Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

✅  Integration test succeeded!

Requested by @AustinBenoit on commit 74db05c
Last updated: Tue Nov 10 13:32 PST 2026
View integration test log & download artifacts

@AustinBenoit

Copy link
Copy Markdown
Contributor Author

CI Validation Runs (b029618e)

C++ SDK (fix/libcurl-windows-ntddi-version)

Unity SDK (branch ab-test-libcurl-ntddi, firebase_cpp_sdk_version=fix/libcurl-windows-ntddi-version)

@github-actions github-actions Bot added the tests: succeeded This PR's integration tests succeeded. label Nov 10, 2026
@firebase-workflow-trigger firebase-workflow-trigger Bot removed the tests: in-progress This PR's integration tests are in progress. label Nov 10, 2026
@AustinBenoit
AustinBenoit merged commit 74db05c into main Nov 10, 2026
121 of 139 checks passed
@github-actions github-actions Bot added tests: in-progress This PR's integration tests are in progress. tests: succeeded This PR's integration tests succeeded. and removed tests: succeeded This PR's integration tests succeeded. labels Nov 10, 2026
@firebase-workflow-trigger firebase-workflow-trigger Bot removed the tests: in-progress This PR's integration tests are in progress. label Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-release-notes Skip release notes check tests: succeeded This PR's integration tests succeeded.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants