git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Bug: git diagnose crashes with Segmentation fault outside of git repository

From
KKks1322 ks1322 <ks1322@gmail.com>
Date
Oct 14, 2023, 11:59 UTC
Message-ID
<CAKFQ_Q9WjF9i-Rx2jdCw-adPVQrWNfNKrDY-em8Rpa5RNLXz4A@mail.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) Run `git diagnose` outside of any git repository

What did you expect to happen? (Expected behavior) No crash, reasonable diagnose output

What happened instead? (Actual behavior) `git diagnose` crashed with Segmentation fault

$ git diagnose Collecting diagnostic info

git version 2.41.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh Repository root: (null) Available space on '/tmp': 7.75 GiB (mount flags 0x6) Segmentation fault (core dumped)

What's different between what you expected and what actually happened? Segmentation fault, truncated output

Anything else you want to add: `git diagnose` does not crash when run within some git repository

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.41.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 6.5.6-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Oct 6 19:02:35 UTC 2023 x86_64 compiler info: gnuc: 13.1 libc info: glibc: 2.37 $SHELL (typically, interactive shell): /bin/bash

[Enabled Hooks] not run from a git repository - no hooks to show

Next: Martin Ågren
Message 1 of 8 in “Bug: git diagnose crashes with Segmentation fault outside of git repository”
  1. ks1322 ks1322Oct 14, 2023
  2. diagnose: require repositoryMartin Ågren, Oct 14, 2023
  3. Kristoffer HaugsbakkOct 14, 2023
  4. Junio C HamanoOct 14, 2023
  5. Martin ÅgrenOct 19, 2023
  6. Junio C HamanoOct 19, 2023
  7. Victoria DyeOct 19, 2023
  8. Christian CouderOct 14, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.