]> git.ipfire.org Git - thirdparty/curl.git/commit
cmake: disable unity mode with Windows Unicode + TrackMemory
authorViktor Szakats <commit@vsz.me>
Mon, 2 Oct 2023 01:03:43 +0000 (01:03 +0000)
committerViktor Szakats <commit@vsz.me>
Mon, 2 Oct 2023 23:28:18 +0000 (23:28 +0000)
commitd82b080f6374433ce7c98241329189ad2d3976f8
treeacd2b319148fb6d869704e34fb433df554308ab3
parent4e8a3a1fc83b98c8803eb81124d2e7d9ca0b5974
cmake: disable unity mode with Windows Unicode + TrackMemory

"TrackMemory" is `ENABLE_DEBUG=ON` (aka `ENABLE_CURLDEBUG=ON`,
aka `-DCURLDEBUG`).

There is an issue with memory tracking and Unicode when built in "unity"
mode, which results in the curl tool crashing right on startup, even
without any command-line option. Interestingly this doesn't happen under
WINE (at least on the system I tested this on), but consistenly happens
on real Windows machines. Crash is 0xC0000374 heap corruption. Both
shared and static curl executables are affected.

This limitation probably won't hit too many people, but it remains
a TODO to find and fix the root cause and drop this workaround.

Example builds and runs:
https://ci.appveyor.com/project/curlorg/curl/builds/48169111/job/17cptxhtpubd7iwj#L313 (static)
https://ci.appveyor.com/project/curlorg/curl/builds/48169111/job/76e1ge758tbyqu9c#L317 (shared)

Follow-up to 3f8fc25720900b14b7432f4bd93407ca15311719 #11095

Ref: #11928
Closes #12005
CMakeLists.txt