Repository navigation
Conversation
To make these tests pass again: 1: 120 allocations allowed, did 121 440: 145 allocations allowed, did 147 767: 120 allocations allowed, did 122
1: 120 allocations allowed, did 128 440: 150 allocations allowed, did 154 767: 125 allocations allowed, did 129 https://github.com/curl/curl/actions/runs/19871780796/job/56949160740
617c1b5 to
5b2c1cd
Compare
|
There remains one oddball failure in test 1498, in the Windows c-ares Unicode build (that also needed an extra alloc limit bump for tests 1, 440, 767): |
|
Analysis of PR #19845 at 5b2c1cd2: Test 1498 failed, but it has been 0.5% flaky lately, so it's probably NOT a fault of the PR. Note that this test has failed in 10 different CI jobs (the link just goes to one of them). Generated by Testclutch |
|
test 1498 is the one running the problematic threaded code, with TerminateThread() on Windows. |
|
Hm, pushed a commit that's an unrelated strdup elimination, and now the 1498 failure is gone: Both a flaky failure and the commit above being related seems unlikely, yet.. Either way if this PR puts Windows allocations under more scrutiny, it's a plus. |
|
Planning to merge this soon to fit in rc1. |
|
Nice, so this indeed somehow made 1498 flaky, now seen in another PR (but not in the merge commit on master): I still suspect the code mentioned earlier. Can look into it Monday. To not break CI in the meantime, shall I disable this test for Windows? |
Test became flaky with memanalyze errors after merging #19845, in a TrackMemory Windows Unicode c-ares openssl-quic build: GHA/windows: mingw, AM x86_64 c-ares U. Disable it until further investigation. This test uses the Windows-specific multi-threaded stdin code that caused issues in the past. It's also using `TerminateThread()`, that apps aren't supposed to. Examples: #19845 (comment) https://github.com/curl/curl/actions/runs/19948992659/job/57205061260?pr=19845#step:13:3028 https://github.com/curl/curl/actions/runs/19966429786/job/57259325027?pr=19852#step:13:3030 Also seen to fail earlier while testing torture tests on Windows: #19675 (comment) Ref: 4e051ff #19845 Closes #19855
Clone a multibye conversion function into curlx/fopen, and use that
local copy from curlx/fopen functions. Adjust allocators in curlx/fopen
to use curl's in normal builds, and system allocators in TrackMemory
builds to avoid recursion.
This allows to switch curlx/multibyte functions to curl allocators in
all configurations, as they are no longer called by curlx/fopen, and
a recursive call can no longer happen.
After this patch the system allocator is only used in TrackMemory
Windows builds, within curlx
fopen,freopen,statandopenfunctions.
Also:
in Windows Unicode builds.
curlx_unicodefree()macro withcurlx_free()across the codebase.
curlx_unicodefree().identical after moving from
curlx_unicodefree()tocurlx_free().the original allocation is now already done by curl's.
FindWin32CACert().calloclog message withmalloc's.Fixes #19748
in test:
1: 120 allocations allowed, did 121
1: 120 allocations allowed, did 128 (Windows / mingw, AM x86_64 c-ares U)
440: 145 allocations allowed, did 147
440: 150 allocations allowed, did 154 (Windows / mingw, AM x86_64 c-ares U)
767: 120 allocations allowed, did 122
767: 125 allocations allowed, did 129 (Windows / mingw, AM x86_64 c-ares U)
Ref: https://github.com/curl/curl/actions/runs/19947141272/job/57199276774?pr=19845