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

Re: [PATCH] Revert "builtin/bundle.c: let parse-options parse subcommands"

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Dec 20, 2022, 13:42 UTC
Message-ID
<221220.861qouxk79.gmgdl@evledraar.gmail.com>
In-Reply-To
<0609575c-68ad-5392-0631-3563c179f177@github.com>
On Tue, Dec 20 2022, Derrick Stolee wrote:
Show 10 quoted lines
> On 12/20/22 7:31 AM, Hubert Jasudowicz wrote:
>> This reverts commit aef7d75e5809eda765bbe407c7f8e0f8617f0fd0.
>> 
>> The change breaks git bundle command. Running any subcommand
>> results with:
>> 
>> $ git bundle create
>> Segmentation fault (core dumped)
>
> Could you be more specific?
I don't think the report can get more specific than (quoting it):
	$ git bundle create
	Segmentation fault (core dumped)
:) Did you try running it?
> We have tests that verify that
> these commands work without a segfault. There must be something
> different about your environment that makes the segfault occur.

We don't have those tests, I submitted an alternate smaller fix in https://lore.kernel.org/git/patch-1.1-2319eb2ddbd-20221220T133941Z-avarab@gmail.com/ that adds some.

I think what you're misrecalling here is probably that we have general tests for running "git <cmd> -h" for all built-in <cmd>, but we don't have any such tests for running sub-commands.

And even then, that wouldn't catch this, as it's a bespoke segfault in the bundle code, as it can't handle not getting at least one non-option argument.

Previous: Derrick StoleeNext: Ævar Arnfjörð Bjarmason
Message 3 of 11 in “Revert "builtin/bundle.c: let parse-options parse subcommands"”
  1. Revert "builtin/bundle.c: let parse-options parse subcommands"Hubert Jasudowicz, Dec 20, 2022
  2. Derrick StoleeDec 20, 2022
  3. Ævar Arnfjörð BjarmasonDec 20, 2022
  4. bundle: don't segfault on "git bundle <subcmd>"Ævar Arnfjörð Bjarmason, Dec 20, 2022
  5. Hubert JasudowiczDec 20, 2022
  6. Junio C HamanoDec 25, 2022
  7. Junio C HamanoDec 25, 2022
  8. 0/2 builtin/bundle.c: segfault fix style & error reporting follow-upÆvar Arnfjörð Bjarmason, Dec 27, 2022
  9. 1/2 builtin/bundle.c: remove superfluous "newargc" variableÆvar Arnfjörð Bjarmason, Dec 27, 2022
  10. 2/2 bundle <cmd>: have usage_msg_opt() note the missing "<file>"Ævar Arnfjörð Bjarmason, Dec 27, 2022
  11. Junio C HamanoDec 27, 2022

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.