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

Re: [PATCHv3] transport: Catch non positive --depth option value

From
Duy Nguyen <pclouds@gmail.com>
Date
Nov 26, 2013, 11:09 UTC
Message-ID
<CACsJy8Dfibu96VchD=p_05deLm-46mfXZzcYQg+0BqaN2=To=A@mail.gmail.com>
In-Reply-To
<52947B42.4080105@gmail.com>

On Tue, Nov 26, 2013 at 5:43 PM, "Andrés G. Aragoneses" <knocte@gmail.com> wrote:

Show 26 quoted lines
> On 26/11/13 04:06, Duy Nguyen wrote:
>> On Tue, Nov 26, 2013 at 6:34 AM, "Andrés G. Aragoneses"
>> <knocte@gmail.com> wrote:
>>> On 22/11/13 02:18, Duy Nguyen wrote:
>>>> On Fri, Nov 22, 2013 at 3:18 AM, Junio C Hamano <gitster@pobox.com> wrote:
>>>>> Have you run the tests with this patch?  It seems that it breaks
>>>>> quite a lot of them, including t5500, t5503, t5510, among others.
>>>>
>>>> I guess it's caused by builtin/fetch.c:backfill_tags(). And the call
>>>> could be replaced with
>>>>
>>>> transport_set_option(transport, TRANS_OPT_DEPTH, NULL);
>>>>
>>>
>>> Not sure what you mean,
>>> https://github.com/git/git/blob/master/t/t5550-http-fetch.sh doesn't
>>> call backfill_tags. What do you mean?
>
> That was a typo, I meant
> https://github.com/git/git/blob/master/t/t5500-fetch-pack.sh
>
>
>> I wrote "I guess" ;-) I did not check what t5550 does.
>
> Any hint on where to start looking? It doesn't look like any test is
> using a non-positive depth, so I'm really confused.

Replace die() with "*(char*)0 = 0;" and run t5500, I got a core dump. Running gdb shows this

(gdb) bt #0 0x000000000053d98b in set_git_option (opts=0xb63d00, name=0x575767 "depth", value=0x575c91 "0") at transport.c:487 #1 0x000000000053f163 in transport_set_option (transport=0xb63f00, name=0x575767 "depth", value=0x575c91 "0") at transport.c:1000 #2 0x0000000000437b68 in backfill_tags (transport=0xb63f00, ref_map=0xb64d60) at builtin/fetch.c:773 #3 0x0000000000437f91 in do_fetch (transport=0xb63f00, refs=0xb643c0, ref_count=1) at builtin/fetch.c:869 #4 0x00000000004386d4 in fetch_one (remote=0xb63c20, argc=1, argv=0x7fff32f63588) at builtin/fetch.c:1037 #5 0x0000000000438a1d in cmd_fetch (argc=2, argv=0x7fff32f63580, prefix=0x0) at builtin/fetch.c:1115 #6 0x000000000040590f in run_builtin (p=0x7d59a8, argc=4, argv=0x7fff32f63580) at git.c:314 #7 0x0000000000405aa2 in handle_internal_command (argc=4, argv=0x7fff32f63580) at git.c:478 #8 0x0000000000405bbc in run_argv (argcp=0x7fff32f6346c, argv=0x7fff32f63470) at git.c:524 #9 0x0000000000405d61 in main (argc=4, av=0x7fff32f63578) at git.c:607

My guess seems right.
-- 
Duy
Previous: Andrés G. AragonesesNext: Andrés G. Aragoneses
Message 13 of 16 in “transport: Catch non positive --depth option value”
  1. transport: Catch non positive --depth option valueAndrés G. Aragoneses, Nov 13, 2013
  2. Duy NguyenNov 16, 2013
  3. Junio C HamanoNov 18, 2013
  4. [PATCHv2] transport: Catch non positive --depth option valueAndrés G. Aragoneses, Nov 18, 2013
  5. Junio C HamanoNov 19, 2013
  6. [PATCHv3] transport: Catch non positive --depth option valueAndrés G. Aragoneses, Nov 21, 2013
  7. Junio C HamanoNov 21, 2013
  8. Junio C HamanoNov 21, 2013
  9. Duy NguyenNov 22, 2013
  10. Andrés G. AragonesesNov 25, 2013
  11. Duy NguyenNov 26, 2013
  12. Andrés G. AragonesesNov 26, 2013
  13. Duy NguyenNov 26, 2013
  14. [PATCHv4] transport: Catch non positive --depth option valueAndrés G. Aragoneses, Nov 26, 2013
  15. Jonathan NiederNov 26, 2013
  16. Junio C HamanoNov 26, 2013

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.