* git log --graph --no-graph can cause segfault
@ 2025-02-08 3:34 Emily Klassen
2025-02-08 4:44 ` Đoàn Trần Công Danh
0 siblings, 1 reply; 3+ messages in thread
From: Emily Klassen @ 2025-02-08 3:34 UTC (permalink / raw)
To: git
> What did you do before the bug happened? (Steps to reproduce your issue)
$ git config --get alias.l
log --pretty=oneline --abbrev-commit --decorate --graph
$ git --no-pager l --reverse --no-graph --name-status
e83c516331 Initial revision of "git", the information manager from hell
error: git died of signal 11
> What did you expect to happen? (Expected behavior)
I expect the commit listing to display successfully.
> What happened instead? (Actual behavior)
Git seems to have crashed. My best guess is that some state gets set with the
first `--graph` flag which is not cleared with the `--no-graph` flag.
> What's different between what you expected and what actually happened?
Git crashed.
> Anything else you want to add:
I also tried to manually expand the alias with
$ git --no-pager log --pretty=oneline --abbrev-commit --decorate
--graph HEAD --reverse --no-graph --name-status
e83c516331 Initial revision of "git", the information manager from hell
$ echo $?
139
Which indicates a segfault.
The below command works properly
$ git log --pretty=oneline --abbrev-commit --decorate HEAD --reverse
--name-status
but obviously, the intent is to be able to use my `l` alias with the
`--reverse` flag by disabling `--graph`. My workaround is to create a `lr`
alias which replaces `--graph` with `--reverse`.
I also tested "git log --graph --no-graph --name-only" and "--patch"
and "--name-status", and all of those failed, without even specifying
"--reverse"
Also verified by building `git` from the `next` branch.
> 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.48.1
cpu: arm64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
libcurl: 8.7.1
zlib: 1.2.12
uname: Darwin 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:16
PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000 arm64
compiler info: clang: 16.0.0 (clang-1600.0.26.6)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/zsh
[Enabled Hooks]
~ Emily Marigold Klassen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git log --graph --no-graph can cause segfault
2025-02-08 3:34 git log --graph --no-graph can cause segfault Emily Klassen
@ 2025-02-08 4:44 ` Đoàn Trần Công Danh
2025-02-08 5:51 ` Emily Klassen
0 siblings, 1 reply; 3+ messages in thread
From: Đoàn Trần Công Danh @ 2025-02-08 4:44 UTC (permalink / raw)
To: Emily Klassen; +Cc: git
On 2025-02-07 19:34:11-0800, Emily Klassen <forivall@gmail.com> wrote:
> > What did you do before the bug happened? (Steps to reproduce your issue)
>
> $ git config --get alias.l
> log --pretty=oneline --abbrev-commit --decorate --graph
>
> $ git --no-pager l --reverse --no-graph --name-status
> e83c516331 Initial revision of "git", the information manager from hell
> error: git died of signal 11
>
> > What did you expect to happen? (Expected behavior)
>
> I expect the commit listing to display successfully.
>
> > What happened instead? (Actual behavior)
>
> Git seems to have crashed. My best guess is that some state gets set with the
> first `--graph` flag which is not cleared with the `--no-graph` flag.
>
> > What's different between what you expected and what actually happened?
>
> Git crashed.
Given commands yields: "fatal: Out of memory, realloc failed" in my
system. But it's fixed by jk/combine-diff-cleanup, which is merged
into master.
Would you try to run from master branch to see if your problem has
been fixed?
--
Danh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git log --graph --no-graph can cause segfault
2025-02-08 4:44 ` Đoàn Trần Công Danh
@ 2025-02-08 5:51 ` Emily Klassen
0 siblings, 0 replies; 3+ messages in thread
From: Emily Klassen @ 2025-02-08 5:51 UTC (permalink / raw)
To: Đoàn Trần Công Danh; +Cc: git
Yup, I built on `next` and it's still resulting in the segfault.
However, I did end up figuring out the issue, and I'm sending a proper
patch momentarily. Basically "revs->diffopt.output_prefix_data" needs
to be nulled in the "--no-graph" argument parser in revision.c
~ Emily Marigold Klassen
On Fri, Feb 7, 2025 at 8:45 PM Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:
>
> On 2025-02-07 19:34:11-0800, Emily Klassen <forivall@gmail.com> wrote:
> > > What did you do before the bug happened? (Steps to reproduce your issue)
> >
> > $ git config --get alias.l
> > log --pretty=oneline --abbrev-commit --decorate --graph
> >
> > $ git --no-pager l --reverse --no-graph --name-status
> > e83c516331 Initial revision of "git", the information manager from hell
> > error: git died of signal 11
> >
> > > What did you expect to happen? (Expected behavior)
> >
> > I expect the commit listing to display successfully.
> >
> > > What happened instead? (Actual behavior)
> >
> > Git seems to have crashed. My best guess is that some state gets set with the
> > first `--graph` flag which is not cleared with the `--no-graph` flag.
> >
> > > What's different between what you expected and what actually happened?
> >
> > Git crashed.
>
> Given commands yields: "fatal: Out of memory, realloc failed" in my
> system. But it's fixed by jk/combine-diff-cleanup, which is merged
> into master.
>
> Would you try to run from master branch to see if your problem has
> been fixed?
>
> --
> Danh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-08 5:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-08 3:34 git log --graph --no-graph can cause segfault Emily Klassen
2025-02-08 4:44 ` Đoàn Trần Công Danh
2025-02-08 5:51 ` Emily Klassen
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 NNTP newsgroup(s).