-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
cmake: allow CURL_STATIC_CRT
with UCRT VS2015+ builds
#16522
Conversation
The crasher Here's the reproducer PR and CI VS2017 job: OK:
Hang:
So far it seems in crashes on these conditions:
It's very odd. Seeing these it seems slighly more likely that curl's printf() might be touching stderr |
CURL_STATIC_CRT
with UCRT (VS2015+) builds
CURL_STATIC_CRT
with UCRT (VS2015+) buildsCURL_STATIC_CRT
with all UCRT (VS2015+) builds
CURL_STATIC_CRT
with all UCRT (VS2015+) buildsCURL_STATIC_CRT
with UCRT VS2015+ builds
After this patch, we're back to 8.12.1, but disallowing
CURL_STATIC_CRT=ON
with shared curl exe built with VS2013 or older.Because those may crash. A stable reprducer is with
ENABLE_DEBUG=ON
and calling
curl.exe -V
.You can pass the necessary CMake and MSVC linker options manually,
to get around this condition.
Shared build with static UCRT may be crashing too, depending on
conditions. Consult the documentation about limitations of static CRT:
https://learn.microsoft.com/cpp/c-runtime-library/crt-library-features
Follow-up to 049352d #16516
Follow-up to edfa537 #16456
Ref: #16394