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

Re: [PATCH updated] git wrapper: DWIM mistyped commands

From
Alex Riesen <raa.lkml@gmail.com>
Date
Aug 31, 2008, 13:57 UTC
Message-ID
<20080831135717.GA25984@blimp.local>
In-Reply-To
<237967ef0808300333t2cd4e354xd461f7bfead40f4c@mail.gmail.com>
Mikael Magnusson, Sat, Aug 30, 2008 12:33:26 +0200:
Show 14 quoted lines
> 2008/8/30 Alex Riesen <raa.lkml@gmail.com>:
> > 2008/8/29 Mikael Magnusson <mikachu@gmail.com>:
> >> I merged the branch in pu into next, which I think should work, but I get
> >> these segfaults for some commands... I tried running in gdb but even with
> >
> > Can't reproduce in master, will try with next later, am busy right now, sorry.
> >
> >> -g3 I only get nonsense backtraces, not sure why.
> >
> > Remove -O2 from CFLAGS:
> >
> >  $ make CFLAGS="-O0 -ggdb"
> 
> Hm, I only had CFLAGS set in the env, maybe that's not enough, or maybe it

The make variables set in Makefile take precedence over the variables with same names in environment (see make(1), "-e" option).

Show 18 quoted lines
> was that I had it set to -gdwarf-2 -g3 instead of -ggdb3. At any rate, I got
> this now:
> 
> % git fotch
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xa7ce56c0 (LWP 13043)]
> 0x41b61490 in ?? () from /lib/libc.so.6
> (gdb) bt
> #0  0x41b61490 in ?? () from /lib/libc.so.6
> #1  0x41b634b0 in realloc () from /lib/libc.so.6
> #2  0x41b62fdb in malloc () from /lib/libc.so.6
> #3  0x080f63e6 in xmalloc (size=24) at wrapper.c:20
> #4  0x080f6471 in xmemdupz (data=0x816a44f, len=23) at wrapper.c:45
> #5  0x080f64e9 in xstrndup (str=0x816a44f "refs/remotes/origin/man",
> len=23) at wrapper.c:54
> #6  0x080dc05c in parse_refspec_internal (nr_refspec=6,
> refspec=0x816a010, fetch=1, verify=0)
>     at remote.c:505
Looks like heap corruption. See that patch I sent today.
Previous: Mikael MagnussonNext: Junio C Hamano
Message 9 of 19 in “Remove calculation of the longest command name from where it is not used”
  1. Remove calculation of the longest command name from where it is not usedAlex Riesen, Aug 28, 2008
  2. git wrapper: DWIM mistyped commandsAlex Riesen, Aug 28, 2008
  3. Add help.autocorrect to enable/disable autocorrectingAlex Riesen, Aug 28, 2008
  4. Andreas EricssonAug 29, 2008
  5. Junio C HamanoSep 8, 2008
  6. Mikael MagnussonAug 29, 2008
  7. Alex RiesenAug 30, 2008
  8. Mikael MagnussonAug 30, 2008
  9. Alex RiesenAug 31, 2008
  10. Junio C HamanoAug 30, 2008
  11. Alex RiesenAug 30, 2008
  12. Reuse cmdname->len to store pre-calculated similarity indexesAlex Riesen, Aug 30, 2008
  13. Junio C HamanoAug 30, 2008
  14. git wrapper: DWIM mistyped commandsAlex Riesen, Aug 31, 2008
  15. Add help.autocorrect to enable/disable autocorrectingAlex Riesen, Aug 31, 2008
  16. Matthieu MoyAug 31, 2008
  17. Junio C HamanoAug 31, 2008
  18. Mikael MagnussonSep 1, 2008
  19. Felipe Carvalho OliveiraAug 30, 2008

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.