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

Re: [PATCH v2 0/3] config: fix segfault when parsing "core.abbrev" without repo

From
Karthik Nayak <karthik.188@gmail.com>
Date
Jun 12, 2024, 09:29 UTC
Message-ID
<CAOLa=ZQBmp3Aj135HppKzkcVhpNC40JgtX6YN6Dam34cmeSg5Q@mail.gmail.com>
In-Reply-To
<cover.1718178996.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 19 quoted lines
> Hi,
>
> this is the second version of my patch series that fixes a segfault when
> parsing "core.abbrev" without a repository.
>
> Changes compared to v1:
>
>   - Stop truncating the abbreviation length to the upper boundary
>     completely. It's unnecessary, complicates the code and makes us
>     dependent on `the_repository`.
>
>   - Adapt `parse_opt_abbrev_cb()` to also stop truncating such that the
>     behaviour of "core.abbrev" and `--abbrev` is the same.
>
>   - Extend test coverage a bit.
>
> Thanks!
>
> Patrick

The changes look good, I wasn't expecting a benchmark in the last commit for such a small change, but that was nice to see. Thanks.

[snip]
Previous: Patrick Steinhardt
Message 14 of 14 in “SEGV (detected by Address Sanitizer) when using `core.abbrev` option”
  1. Kyle LippincottJun 10, 2024
  2. Kyle LippincottJun 10, 2024
  3. Junio C HamanoJun 10, 2024
  4. Patrick SteinhardtJun 11, 2024
  5. 1/2 config: fix segfault when parsing "core.abbrev" without repoPatrick Steinhardt, Jun 11, 2024
  6. Junio C HamanoJun 11, 2024
  7. Patrick SteinhardtJun 12, 2024
  8. 2/2 object-name: don't try to abbreviate to lengths greater than hexszPatrick Steinhardt, Jun 11, 2024
  9. 0/3 config: fix segfault when parsing "core.abbrev" without repoPatrick Steinhardt, Jun 12, 2024
  10. 1/3 config: fix segfault when parsing "core.abbrev" without repoPatrick Steinhardt, Jun 12, 2024
  11. Karthik NayakJun 12, 2024
  12. 2/3 parse-options-cb: stop clamping "--abbrev=" to hash lengthPatrick Steinhardt, Jun 12, 2024
  13. 3/3 object-name: don't try to abbreviate to lengths greater than hexszPatrick Steinhardt, Jun 12, 2024
  14. Karthik NayakJun 12, 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.