Closed
Labels
Milestone
Description
Existing issues matching what you're seeing
- I was not able to find an open or closed issue matching what I'm seeing
Git for Windows version
git version 2.56.0.windows.1
cpu: x86_64
built from commit: 49d759b698127791a5f3f2759c69b983846711dd
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
rust: disabled
feature: fsmonitor--daemon
gettext: enabled
libcurl: 8.22.0
OpenSSL: OpenSSL 3.5.8 25 Aug 2026
zlib: 1.3.2
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1Windows version
Windows 11
Windows CPU architecture
x86_64 (64-bit)
Additional Windows version information
Microsoft Windows [Version 10.0.26100.9457]Options set during installation
Editor Option: VIM
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: WinSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable FSMonitor: DisabledOther interesting things
According to Google AI, the most likely cause of this issue is that Git for Windows version 2.56.0.windows.1 was accidentally bundled with a debug version of libcurl-4.dll, rather than a production version. A text search of the raw binary data of libcurl-4.dll showed that it contained references to "curl_dbg_*" functions (e.g., curl_dbg_free, curl_dbg_malloc, etc.), which (Google claims) can only happen in debug builds.
Terminal/shell
PowerShell
Commands that trigger the issue
git push origin HEAD:myBranchExpected behaviour
The commit(s) should be pushed to the remote repo successfully.
Actual behaviour
The command produces the following error message:
Assertion failed: wantedsize != 0, file ../../curl-8.22.0/lib/memdebug.c, line 216
Repository
No response
Activity
dscho commentedon Oct 2, 2026
Please test the latest snapshot. If it still persists, do try to come up with a more reliable reproducer; Your suggested
git push origin HEAD:myBranchworks here without any problems.jared-m-cohen-civ commentedon Oct 2, 2026
Unfortunately, that isn't really an option. The apps installed on my machine, including Git, are strictly managed by my organization, and they almost certainly would not allow me to install a nightly snapshot build.
However, I can provide another detail that I forgot to mention, which may help reproduce the issue. The Google thread claims that this issue only affects remote repos with an HTTPS URL. SSH URLs do not trigger the issue, as they bypass Curl entirely and use Windows OpenSSH instead. Can you test with an HTTPS repo and see if that lets you reproduce the problem?
dscho commentedon Oct 2, 2026
The latest snapshot is fully code-signed, just like a full version would be.
Well, yes, I guessed that much, seeing as Git only uses libcurl for the HTTP/HTTPS/FTPS transports. And naturally, I did test this with HTTPS URLs.
There must be something specific about your data shape (where "data" might include things outside your Git packfiles).
jared-m-cohen-civ commentedon Oct 2, 2026
It wouldn't matter. They're very strict about software versioning and security. Most apps can't even be installed by regular employees like me; only someone with administrator rights (which I don't have) can install software. The only apps I can install myself are those listed in the Software Center app, which only includes stable releases that have been vetted and approved; this is how I got "Git for Windows" installed in the first place.
I'm not so sure about that. Pushing this same repo using the Git client bundled with Visual Studio (MinGit
2.55.0/ Git for Windows2.55.0.windows.5) does still work, which would seem to indicate that the problem is specifically with version2.56.0.windows.1.becm commentedon Oct 2, 2026
@dscho no change with
g2734d898d3, running withGIT_CURL_VERBOSE=1still prints:Borrowing
libcurl-4.dllfromMinGit-2.55.0.5-64-bit.zipdoes not complain about being a debug build.Maybe some issue due to the ucrt64 switch?
@jared-m-cohen-civ calling
malloc(0)might be caused by strange condidtions like an empty body or HTTP header.Nothing serious, but hard to track down without a reliable (locally debuggable) reproducer.
dscho commentedon Oct 3, 2026
@becm yes, I understand that this works with an older
libcurl-4.dll, and I am 99% certain that git-for-windows/MINGW-packages@59514c9 is responsible for this.The question is: Why does this assertion trigger at all? That is a bug either in the way Git uses libcurl, or in libcurl itself, and I want to see this bug fixed. I can work around it, but I have a higher standard than merely ignore that assertion.
dscho commentedon Oct 3, 2026
@jared-m-cohen-civ you are misreading what is happening here. v2.55 merely "works" because assertions have not been enabled in that build. Assertions are testing hard assumptions, which point to a bug. And the bug is triggered by your specific data shape, there cannot be any question about that at this moment because I have pushed plenty of times, yes, via HTTPS, with the affected libcurl in the time since v8.22.0 was integrated into Git for Windows' SDK, without hitting this assertion even once.
jared-m-cohen-civ commentedon Oct 5, 2026
@dscho OK...so what do you suggest? I can't just post my entire project here, it's proprietary code and it's way too big to attach anyway.
Since we know precisely what line in
memdebug.cis triggering the assertion, could you speculate on precisely what condition(s) would need to be present in order for that assertion to fail? Then I could try creating a dummy project that meets those conditions, and use that as your local reproducer.dscho commentedon Oct 5, 2026
In the future, I might let this report serve as an excellent example how bug reports with too terse, too little information can quite possibly cause a ton of work for already overworked maintainers, how it can cost them entire weekends, and how such reports, as a consequence, can harm open source by burning out the very software engineers that keep it running.
After many hours of investigation, I have the working theory (and for those who mistake "theory" in a scientist's writing for something less than solid, rest assured that it as solid as I can make it) that the data shape in question is an unmentioned server-side setup where IIS is configured with
Require SSL: CheckedandClient certificates: AcceptorRequire.Since I do not have anything remotely close to that environment, nor client certificates to work with, I painstakingly wrote this Node.JS reproducer (where AI was, for once, more helpful than the human reporter):
With this reproducer, I get the very same assertion.
jared-m-cohen-civ commentedon Oct 5, 2026
I apologize for the lack of detail. I fully understand and appreciate the value of a well-documented, reproducible bug report. I would have gladly provided a working example if I had had one, but I genuinely did not know how to create one. As far as I know, I didn't do anything unusual or abnormal when I created the project, so I had no idea exactly what factors were causing this assertion to fail, and thus no idea how to create a sample project that would reliably reproduce it.
Avoid curl assertion when renegotiating with empty token (#226)
schannel: handle empty tokens during renegotiation