git log --graph --no-graph can cause segfault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux