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

builtin/stash - segmentation fault

From
FMFadhil Mandaga <firodj@gmail.com>
Date
Jun 4, 2024, 07:12 UTC
Message-ID
<CADV-Dy+dU+t=MCy5mwrMZ7LBvOh0T1zKos=-YpNk0EzXZN78tw@mail.gmail.com>
Hi,

When `git stash` on detached HEAD I got a segmentation fault. I am using git 2.45.2 on OSX/Darwin. Furthermore the culprit is EXC_BAD_ACCESS on `repo_find_unique_abbrev_r` because `oid` is invalid. The `oid` was obtained from NULL `lookup_commit` in `do_create_stash`. The result from `lookup_commit` should be checked for validation to avoid null access.

https://github.com/git/git/blob/7b0defb3915eaa0bd118f0996e8c00b4eb2dc1ca/builtin/stash.c#L1380
Thanks.
Message 1 of 1 in “builtin/stash - segmentation fault”
  1. Fadhil MandagaJun 4, 2024

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.