git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Brad Beam <brad.beam@b-rad.info>
To: git@vger.kernel.org
Subject: Bug report - ssh signing causes git tag -l malloc failed
Date: Mon, 2 May 2022 14:51:33 -0500	[thread overview]
Message-ID: <16668F1B-7670-4136-8AAF-ABAAA802C7D4@b-rad.info> (raw)

What did you do before the bug happened? (Steps to reproduce your issue)

When using ssh signing `git tag -l --format='%(contents:body)' <tag>` returns `fatal: Out of memory, malloc failed (tried to allocate 18446744073709551323 bytes)`

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

[14:24:03] (0):~/src/github.com/my/repo
% git -c log.showSignature=false tag -l --format='%(contents:body)' v0.0.9
fatal: Out of memory, malloc failed (tried to allocate 18446744073709551323 bytes)

[14:24:27] (0):~/src/github.com/my/repo
% git tag -sm v0.0.9-no-annotate v0.0.9-no-annotate

[14:27:19] (0):~/src/github.com/my/repo
% git -c log.showSignature=false tag -l --format='%(contents:body)' v0.0.9-no-annotate
fatal: Out of memory, malloc failed (tried to allocate 18446744073709551323 bytes)

[14:27:26] (128):~/src/github.com/my/repo
% git tag -m v0.0.9-no-annotate-no-ssh v0.0.9-no-annotate-no-ssh

[14:28:10] (0):~/src/github.com/my/repo
% git -c log.showSignature=false tag -l --format='%(contents:body)' v0.0.9-no-annotate-no-ssh

```

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.36.0
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 20.6.0 Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:42 PDT 2021; root:xnu-7195.141.8~1/RELEASE_X86_64 x86_64
compiler info: clang: 13.0.0 (clang-1300.0.29.30)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/zsh


[Enabled Hooks]


             reply	other threads:[~2022-05-02 19:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 19:51 Brad Beam [this message]
2022-05-02 20:24 ` Bug report - ssh signing causes git tag -l malloc failed Junio C Hamano
2022-05-03  1:02   ` Taylor Blau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16668F1B-7670-4136-8AAF-ABAAA802C7D4@b-rad.info \
    --to=brad.beam@b-rad.info \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).