# git tag -l --format results into a malloc fatal error, if tag is signed.

3 messages from 2022-11-22 to 2022-11-23. Participants: Jan-Otto Kröpke, René Scharfe, Junio C Hamano.
Thread: https://gitlist.dev/t/58837

## Jan-Otto Kröpke, 2022-11-22 08:01

Subject: git tag -l --format results into a malloc fatal error, if tag is signed.
Message-ID: <CAAsn9Yxbb3-4iTfD8gf_EhVbE+yKJdT=Vb5ojeFZOHvMutUn2Q@mail.gmail.com>
URL: https://gitlist.dev/e/CAAsn9Yxbb3-4iTfD8gf_EhVbE%2ByKJdT%3DVb5ojeFZOHvMutUn2Q%40mail.gmail.com

```
Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)
Create a signed git tag signed by a SSH key and run this command
(orginally executed by goreleaser).
% git -c log.showSignature=false tag -l --format='%(contents:body)' v4.2.2

What did you expect to happen? (Expected behavior)
Command executed successfully

What happened instead? (Actual behavior)
% git -c log.showSignature=false tag -l --format='%(contents:body)' v4.2.2
fatal: Out of memory, malloc failed (tried to allocate
18446744073709551323 bytes)


What's different between what you expected and what actually happened?
See above

Anything else you want to add:

Reference repository: https://github.com/jkroepke/helm-secrets

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.38.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Darwin 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct  9 20:14:54
PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64 x86_64
compiler info: clang: 14.0.0 (clang-1400.0.29.102)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/zsh


[Enabled Hooks]

```

## René Scharfe, 2022-11-22 17:48

Subject: Re: git tag -l --format results into a malloc fatal error, if tag is signed.
Message-ID: <7386132c-995a-5bfc-ed67-ec6dc2c3e7f9@web.de>
URL: https://gitlist.dev/e/7386132c-995a-5bfc-ed67-ec6dc2c3e7f9%40web.de
In-Reply-To: <CAAsn9Yxbb3-4iTfD8gf_EhVbE+yKJdT=Vb5ojeFZOHvMutUn2Q@mail.gmail.com>

```
Am 22.11.22 um 09:01 schrieb Jan-Otto Kröpke:
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
>
> What did you do before the bug happened? (Steps to reproduce your issue)
> Create a signed git tag signed by a SSH key and run this command
> (orginally executed by goreleaser).
> % git -c log.showSignature=false tag -l --format='%(contents:body)' v4.2.2
>
> What did you expect to happen? (Expected behavior)
> Command executed successfully
>
> What happened instead? (Actual behavior)
> % git -c log.showSignature=false tag -l --format='%(contents:body)' v4.2.2
> fatal: Out of memory, malloc failed (tried to allocate
> 18446744073709551323 bytes)

Fixed by b01e1c7ef0 (ref-filter: fix parsing of signatures without blank
lines, 2022-11-02).  It hasn't made it into a release, yet, but I would
expect it to be included in an upcoming version 2.38.2.  Discussion:
https://lore.kernel.org/git/Y2IfT0UFJ7H%2FmHMz@coredump.intra.peff.net/.

>
>
> What's different between what you expected and what actually happened?
> See above
>
> Anything else you want to add:
>
> Reference repository: https://github.com/jkroepke/helm-secrets
>
> Please review the rest of the bug report below.
> You can delete any lines you don't wish to share.
>
>
> [System Info]
> git version:
> git version 2.38.1
> cpu: x86_64
> no commit associated with this build
> sizeof-long: 8
> sizeof-size_t: 8
> shell-path: /bin/sh
> feature: fsmonitor--daemon
> uname: Darwin 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct  9 20:14:54
> PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64 x86_64
> compiler info: clang: 14.0.0 (clang-1400.0.29.102)
> libc info: no libc information available
> $SHELL (typically, interactive shell): /bin/zsh
>
>
> [Enabled Hooks]


```

## Junio C Hamano, 2022-11-23 00:20

Subject: Re: git tag -l --format results into a malloc fatal error, if tag is signed.
Message-ID: <xmqqedtuplmr.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqqedtuplmr.fsf%40gitster.g
In-Reply-To: <7386132c-995a-5bfc-ed67-ec6dc2c3e7f9@web.de>

```
René Scharfe <l.s.r@web.de> writes:

> Fixed by b01e1c7ef0 (ref-filter: fix parsing of signatures without blank
> lines, 2022-11-02).  It hasn't made it into a release, yet, but I would
> expect it to be included in an upcoming version 2.38.2.

I am fairly certain it would be in 2.39 but probably not 2.38
maintenance track, as b01e1c7ef0 seems to have been applied without
considering that it is a maint-worthy material.



```
