{"author":"Viktor Szakats","author_email":"commit@vsz.me","author_time":1740414477,"commit_time":1740427231,"committer":"Viktor Szakats","committer_email":"commit@vsz.me","hash":"edfa537100d6b5d2ac1b829c66757880afe59407","message":"cmake: restrict static CRT builds to static curl exe, test in CI\n\nStatic CRT crashes MSVCR* MSVC builds (in VS2008, VS2010, VS2012,\nVS2013) according to CI and local tests. The reproducible crash happens\nin `curl_mfprintf() -> fputc(s, stderr)` when trying to display the\nwarning message in `curl -V`. `stderr` is non-NULL and resolves to `2`.\nThis reproducer needs a debug-enabled build, but it's unrelated to debug\nfeatures or curl's memory tracker. It happens regardless of unity build,\nCPU architecture or `DllMain()` use. Example from VS2013:\n\n```\n+ _bld/src/Debug/curl.exe --disable --version\n./appveyor.sh: line 124:   203 Segmentation fault      \"${curl}\" --disable --version\n```\nRef: https://ci.appveyor.com/project/curlorg/curl/builds/51570451/job/ojpdqrsm1hmpmq6a#L210\n\nAnother crash happened in an UCRT build (VS2017) with a couple of\n`printf()`s added to curl's `main()` function:\n\n```\nMicrosoft Visual C++ Runtime Library\nDebug Assertion Failed!\nProgram: C:/projects/curl/bld/src/Debug/curl.exe\nFile: minkernel/crts/ucrt/src/appcrt/heap/debug_heap.cpp\nLine: 996\nExpression: _act_first_block == header\n```\n(it hangs the job in CI due to the GUI popup)\nRef: https://github.com/curl/curl/pull/16394#issuecomment-2677181716\n\nTo avoid actual and potential issues, this patch issues a warning on\nthe shared-libcurl + static-CRT combination and falls back to the\ndefault, shared CRT. IOW a static CRT build now requires a static curl\nexe when using the `CURL_STATIC_CRT=ON` option.\n\nFollow-up to 4fc6ebe18a607764194ee23e5aa898a027fe3c60 #1621\nCherry-picked from #16394 (with more details there)\n\nCloses #16456\n","parents":["7b8b9b9c2bf84456e30a15c5060edf526b756a44"],"tree_hash":"3e335d4df171fb01894810641843e54d9a3d88c1"}