git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Junio C Hamano <gitster@pobox.com>
Cc: <git@vger.kernel.org>
Subject: Re: [PATCH 0/5] Revamping "git status"
Date: Wed, 5 Aug 2009 11:49:37 +0200	[thread overview]
Message-ID: <200908051149.40980.trast@student.ethz.ch> (raw)
In-Reply-To: <1249463746-21538-1-git-send-email-gitster@pobox.com>

[-- Attachment #1: Type: Text/Plain, Size: 3953 bytes --]

Junio C Hamano wrote:
> 
> Junio C Hamano (5):
>   diff-index: report unmerged new entries
>   diff-index: keep the original index intact
>   wt-status.c: rework the way changes to the index and work tree are
>     summarized
>   status: show worktree status of conflicted paths separately
>   shortstatus: a new command

I was quite eager to try this, mainly for 4/5, and I still had the
testing repository from the last thread around:

  $ git ls-files -s
  100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 1       foo
  100644 d00491fd7e5bb6fa28c517a0bb32b8b506539d4d 2       foo

Here we go!

  $ git status
  # On branch master                            
  Segmentation fault

Uh oh.  So gdb it is then...

# On branch master                                                           

  Program received signal SIGSEGV, Segmentation fault.
  0x00007ffff7353844 in strcmp () from /lib64/libc.so.6
  (gdb) bt                                             
  #0  0x00007ffff7353844 in strcmp () from /lib64/libc.so.6
  #1  0x00000000004cc577 in unmerged_mask (path=Cannot access memory at address 0xfffff070                                                                        
  ) at wt-status.c:241                                                            
  Backtrace stopped: previous frame inner to this frame (corrupt stack?)

... or maybe not.  valgrind is slightly more helpful:

  ==29421== Invalid read of size 1
  ==29421==    at 0x4C26101: strcmp (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
  ==29421==    by 0x4CC576: unmerged_mask (wt-status.c:241)
  ==29421==    by 0x4CC6AA: wt_status_collect_updated_cb (wt-status.c:275)
  ==29421==    by 0x484172: diff_flush (diff.c:3337)
  ==29421==    by 0x47A0E5: run_diff_index (diff-lib.c:445)
  ==29421==    by 0x4CC804: wt_status_collect_changes_index (wt-status.c:306)
  ==29421==    by 0x4CC922: wt_status_collect_changes (wt-status.c:340)
  ==29421==    by 0x4CD1A0: wt_status_print (wt-status.c:561)
  ==29421==    by 0x41BFBD: run_status (builtin-commit.c:369)
  ==29421==    by 0x41D97F: cmd_status (builtin-commit.c:927)
  ==29421==    by 0x4048C2: run_builtin (git.c:246)
  ==29421==    by 0x404A4D: handle_internal_command (git.c:394)
  ==29421==  Address 0x48 is not stack'd, malloc'd or (recently) free'd
  ==29421==
  ==29421== Process terminating with default action of signal 11 (SIGSEGV)
  ==29421==  Access not within mapped region at address 0x48
  ==29421==    at 0x4C26101: strcmp (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
  ==29421==    by 0x4CC576: unmerged_mask (wt-status.c:241)
  ==29421==    by 0x4CC6AA: wt_status_collect_updated_cb (wt-status.c:275)
  ==29421==    by 0x484172: diff_flush (diff.c:3337)
  ==29421==    by 0x47A0E5: run_diff_index (diff-lib.c:445)
  ==29421==    by 0x4CC804: wt_status_collect_changes_index (wt-status.c:306)
  ==29421==    by 0x4CC922: wt_status_collect_changes (wt-status.c:340)
  ==29421==    by 0x4CD1A0: wt_status_print (wt-status.c:561)
  ==29421==    by 0x41BFBD: run_status (builtin-commit.c:369)
  ==29421==    by 0x41D97F: cmd_status (builtin-commit.c:927)
  ==29421==    by 0x4048C2: run_builtin (git.c:246)
  ==29421==    by 0x404A4D: handle_internal_command (git.c:394)

I also tried finding out which exact commit was causing this, but 4/5
still segfaults and 1-3 don't even compile:

  builtin-commit.c: In function ‘show_unmerged’:                                  
  builtin-commit.c:827: error: dereferencing pointer to incomplete type           
  builtin-commit.c: In function ‘show_status’:                                    
  builtin-commit.c:854: error: dereferencing pointer to incomplete type
  [etc]

These are referring to use of a 'struct wt_status_change_data *', but
the struct declaration is only in 4/5.  Am I missing something?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  parent reply	other threads:[~2009-08-05  9:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-05  9:15 [PATCH 0/5] Revamping "git status" Junio C Hamano
2009-08-05  9:15 ` [PATCH 1/5] diff-index: report unmerged new entries Junio C Hamano
2009-08-05  9:15   ` [PATCH 2/5] diff-index: keep the original index intact Junio C Hamano
2009-08-05  9:15     ` [PATCH 3/5] wt-status.c: rework the way changes to the index and work tree are summarized Junio C Hamano
2009-08-05  9:15       ` [PATCH 4/5] status: show worktree status of conflicted paths separately Junio C Hamano
2009-08-05  9:15         ` [PATCH 5/5] shortstatus: a new command Junio C Hamano
2009-08-06 15:33           ` Jeff King
2009-08-06 16:23             ` Breaking "git status" (was Re: [PATCH 5/5] shortstatus: a new command) Junio C Hamano
2009-08-06 16:42               ` Jeff King
2009-08-06 19:06                 ` Breaking "git status" Junio C Hamano
2009-08-06 19:57               ` Breaking "git status" (was Re: [PATCH 5/5] shortstatus: a new command) Sverre Rabbelier
2009-08-06 14:53         ` [PATCH 4/5] status: show worktree status of conflicted paths separately Jeff King
2009-08-06 14:46       ` [PATCH 3/5] wt-status.c: rework the way changes to the index and work tree are summarized Jeff King
2009-08-06 15:50         ` Junio C Hamano
2009-08-05  9:49 ` Thomas Rast [this message]
2009-08-05 16:57   ` [PATCH 0/5] Revamping "git status" Junio C Hamano
2009-08-05 17:37     ` Thomas Rast
2009-08-05 17:40       ` Thomas Rast
2009-08-05 18:05         ` Junio C Hamano
2009-08-05 18:52           ` Thomas Rast
2009-08-05 20:02             ` Junio C Hamano
2009-08-05 20:14               ` Thomas Rast

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200908051149.40980.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).