From: Junio C Hamano Date: Mon, 02 May 2022 20:24:01 GMT Subject: Re: Bug report - ssh signing causes git tag -l malloc failed Message-ID: In-Reply-To: <16668F1B-7670-4136-8AAF-ABAAA802C7D4@b-rad.info> Brad Beam writes: Thanks for a report. > What did you do before the bug happened? (Steps to reproduce your issue) > > When using ssh signing `git tag -l --format='%(contents:body)' ` returns `fatal: Out of memory, malloc failed (tried to allocate 18446744073709551323 bytes)` An obvious first follow-up question is if there is any difference in behaviour if another kind of signing (like PGP) is used. > What did you expect to happen? (Expected behavior) > > The tag to be returned without crashing > > What happened instead? (Actual behavior) > > git crashed with the above error (`fatal: Out of memory, malloc failed (tried to allocate 18446744073709551323 bytes)`) > > What's different between what you expected and what actually happened? > > Anything else you want to add: > > > ``` > [14:23:54] (0):~/src/github.com/my/repo > % git tag -sam v0.0.9 v0.0.9 Here, or before this step, there would probably have been something to say "No, I do not use the default PGP sign, but I want SSH sign"? For those who are reading this bug report and mistakenly thought it is a bug to show a self-recursive tag (like I did during my first reading of the report), the first v0.0.9 is merely an argument to the "-m" option, and the second v0.0.9 is the name of the newly created tag. We are creating a signed tag with v0.0.9 in the message that points at HEAD and has "tag v0.0.9" in the header, and storing the resulting tag at refs/tags/v0.0.9