public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* bug: Segfault with git diff
@ 2024-05-19  3:02 jake roggenbuck
  2025-01-08  6:01 ` [PATCH 0/1] Exit on invalid diff status of diff_filepair Jake Roggenbuck
  0 siblings, 1 reply; 7+ messages in thread
From: jake roggenbuck @ 2024-05-19  3:02 UTC (permalink / raw)
  To: git

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

I have found a segfault when running git diff.

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

1. After running `git diff`, git showed me that object files were empty.
2. I deleted the empty object files, and ran `git diff` again.
3. I continued deleting the empty files until `git diff` segfaulted.

> What did you expect to happen? (Expected behavior)
An error message of some type or a graceful exit.

> What happened instead? (Actual behavior)
A segmentation fault.

`Segmentation fault (core dumped)`

> What's different between what you expected and what actually happened?
Instead of closing gracefully, there was a segmentation fault.

> Anything else you want to add:
git log displays:
fatal: bad object HEAD

git branch displays:
fatal: missing object 7610511b1b4db888e8e6bb8d0ff158f932961345 for
refs/heads/main

Neither log nor branch causes the segfault.

[System Info]
git version:
git version 2.45.1
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 6.7.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 01 Feb 2024
10:30:35 +0000 x86_64
compiler info: gnuc: 14.1
libc info: glibc: 2.39
$SHELL (typically, interactive shell): /bin/bash


[Enabled Hooks]

Best,
Jake Roggenbuck

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-05-01 13:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-19  3:02 bug: Segfault with git diff jake roggenbuck
2025-01-08  6:01 ` [PATCH 0/1] Exit on invalid diff status of diff_filepair Jake Roggenbuck
2025-01-08  6:01   ` [PATCH 1/1] " Jake Roggenbuck
2025-04-30 18:50     ` Jake Roggenbuck
2025-04-30 18:50       ` Jake Roggenbuck
2025-05-01  6:16       ` Eric Sunshine
2025-05-01 13:23         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox