From: Wayne Scott <wsc9tt@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: git-diff-tree rename detection bug
Date: Wed, 14 Sep 2005 13:40:27 -0500 [thread overview]
Message-ID: <59a6e583050914114054b1564d@mail.gmail.com> (raw)
In-Reply-To: <7vwtljjzc3.fsf@assigned-by-dhcp.cox.net>
On 9/14/05, Junio C Hamano <junkio@cox.net> wrote:
> Wayne Scott <wsc9tt@gmail.com> writes:
>
> > Look at the diffs between ad6571a78ac74e9fa27e581834709067dba459af and
> > it's parent with and without rename detection enabled. (In linux-2.6
> > git tree)
>
> > Notice how the the fact that include/asm-ppc64/termios.h is
> > deleted gets lost? Looks broken to me.
>
> I suspect that what is deleted is not asm-ppc64/termios.h but
> asm-ppc/termios.h. The below is an output without grep which
> seems to confuse things.
>
> $ git-diff-tree -r -M ad6571a78ac74e9fa27e581834709067dba459af |
> sed -ne 's/^.* \([AMCRDU]\)/\1/p'
> R092 include/asm-ppc64/mman.h include/asm-powerpc/mman.h
> R097 include/asm-ppc64/termbits.h include/asm-powerpc/termbits.h
> R098 include/asm-ppc64/termios.h include/asm-powerpc/termios.h
> D include/asm-ppc/mman.h
> D include/asm-ppc/termbits.h
> D include/asm-ppc/termios.h
>
> $ git-diff-tree -r ad6571a78ac74e9fa27e581834709067dba459af |
> sed -ne 's/^.* \([AMCRDU]\)/\1/p'
> A include/asm-powerpc/mman.h
> A include/asm-powerpc/termbits.h
> A include/asm-powerpc/termios.h
> D include/asm-ppc/mman.h
> D include/asm-ppc/termbits.h
> D include/asm-ppc/termios.h
> D include/asm-ppc64/mman.h
> D include/asm-ppc64/termbits.h
> D include/asm-ppc64/termios.h
>
> The first 3 A and last 3 D are accounted for in the -M output as
> renames from asm-ppc64 to asm-powerpc. Middle 3 D from asm-ppc
> are shown in the -M output. So I do not think we are losing
> anything. Am I missing something?
Odd. I get the same answer on my x86 box:
$ git-diff-tree -r -M ad6571a78ac74e9fa27e581834709067dba459af | sed
-ne 's/^.* \([AMCRDU]\)/\1/p'
R092 include/asm-ppc64/mman.h include/asm-powerpc/mman.h
R097 include/asm-ppc64/termbits.h include/asm-powerpc/termbits.h
R098 include/asm-ppc64/termios.h include/asm-powerpc/termios.h
D include/asm-ppc/mman.h
D include/asm-ppc/termbits.h
D include/asm-ppc/termios.h
But here is the output on my quad xeon running in 64-bit mode: (fedora core 2)
$ git-diff-tree -r -M ad6571a78ac74e9fa27e581834709067dba459af | sed
-ne 's/^.* \([AMCRDU]\)/\1/p'
R092 include/asm-ppc64/mman.h include/asm-powerpc/mman.h
R097 include/asm-ppc64/termbits.h include/asm-powerpc/termbits.h
A include/asm-powerpc/termios.h
D include/asm-ppc/mman.h
D include/asm-ppc/termbits.h
D include/asm-ppc/termios.h
This is the same version of git both rebuilt just for this test.
However, I noticed a whole collection of errors from valgrind when I
run this command line:
==13457== Invalid read of size 4
==13457== at 0x805402C: locate_rename_dst (diffcore-rename.c:28)
==13457== by 0x805464B: diffcore_rename (diffcore-rename.c:356)
==13457== by 0x805249D: diffcore_std (diff.c:1093)
==13457== by 0x8049B48: call_diff_flush (diff-tree.c:273)
==13457== by 0x804A225: diff_tree_sha1_top (diff-tree.c:298)
==13457== by 0x804A30B: diff_tree_commit (diff-tree.c:363)
==13457== by 0x804A884: main (diff-tree.c:551)
==13457== Address 0x1BBD781C is 20 bytes inside a block of size 71 free'd
==13457== at 0x1B9003C3: free (vg_replace_malloc.c:235)
==13457== by 0x805205B: diff_free_filepair (diff.c:775)
==13457== by 0x805422A: diffcore_rename (diffcore-rename.c:415)
==13457== by 0x805249D: diffcore_std (diff.c:1093)
==13457== by 0x8049B48: call_diff_flush (diff-tree.c:273)
==13457== by 0x804A225: diff_tree_sha1_top (diff-tree.c:298)
==13457== by 0x804A30B: diff_tree_commit (diff-tree.c:363)
==13457== by 0x804A884: main (diff-tree.c:551)
==13457==
==13457== Invalid read of size 1
==13457== at 0x1B90140D: strcmp (mac_replace_strmem.c:332)
==13457== by 0x8054038: locate_rename_dst (diffcore-rename.c:28)
==13457== by 0x805464B: diffcore_rename (diffcore-rename.c:356)
==13457== by 0x805249D: diffcore_std (diff.c:1093)
==13457== by 0x8049B48: call_diff_flush (diff-tree.c:273)
==13457== by 0x804A225: diff_tree_sha1_top (diff-tree.c:298)
==13457== by 0x804A30B: diff_tree_commit (diff-tree.c:363)
==13457== by 0x804A884: main (diff-tree.c:551)
==13457== Address 0x1BBD7830 is 40 bytes inside a block of size 71 free'd
==13457== at 0x1B9003C3: free (vg_replace_malloc.c:235)
==13457== by 0x805205B: diff_free_filepair (diff.c:775)
==13457== by 0x805422A: diffcore_rename (diffcore-rename.c:415)
==13457== by 0x805249D: diffcore_std (diff.c:1093)
==13457== by 0x8049B48: call_diff_flush (diff-tree.c:273)
==13457== by 0x804A225: diff_tree_sha1_top (diff-tree.c:298)
==13457== by 0x804A30B: diff_tree_commit (diff-tree.c:363)
==13457== by 0x804A884: main (diff-tree.c:551)
==13457==
==13457== Invalid read of size 1
==13457== at 0x1B901423: strcmp (mac_replace_strmem.c:332)
==13457== by 0x8054038: locate_rename_dst (diffcore-rename.c:28)
==13457== by 0x805464B: diffcore_rename (diffcore-rename.c:356)
==13457== by 0x805249D: diffcore_std (diff.c:1093)
==13457== by 0x8049B48: call_diff_flush (diff-tree.c:273)
==13457== by 0x804A225: diff_tree_sha1_top (diff-tree.c:298)
==13457== by 0x804A30B: diff_tree_commit (diff-tree.c:363)
==13457== by 0x804A884: main (diff-tree.c:551)
==13504== Invalid read of size 4
==13504== at 0x805402C: locate_rename_dst (diffcore-rename.c:28)
==13504== by 0x805464B: diffcore_rename (diffcore-rename.c:356)
==13504== by 0x805249D: diffcore_std (diff.c:1093)
==13504== by 0x8049B48: call_diff_flush (diff-tree.c:273)
==13504== by 0x804A225: diff_tree_sha1_top (diff-tree.c:298)
==13504== by 0x804A30B: diff_tree_commit (diff-tree.c:363)
==13504== by 0x804A884: main (diff-tree.c:551)
==13504== Address 0x1BBD781C is 20 bytes inside a block of size 71 free'd
==13504== at 0x1B9003C3: free (vg_replace_malloc.c:235)
==13504== by 0x805205B: diff_free_filepair (diff.c:775)
==13504== by 0x805422A: diffcore_rename (diffcore-rename.c:415)
==13504== by 0x805249D: diffcore_std (diff.c:1093)
==13504== by 0x8049B48: call_diff_flush (diff-tree.c:273)
==13504== by 0x804A225: diff_tree_sha1_top (diff-tree.c:298)
==13504== by 0x804A30B: diff_tree_commit (diff-tree.c:363)
==13504== by 0x804A884: main (diff-tree.c:551)
==13504==
==13504== Invalid read of size 1
==13504== at 0x1B90140D: strcmp (mac_replace_strmem.c:332)
==13504== by 0x8054038: locate_rename_dst (diffcore-rename.c:28)
==13504== by 0x805464B: diffcore_rename (diffcore-rename.c:356)
==13504== by 0x805249D: diffcore_std (diff.c:1093)
==13504== by 0x8049B48: call_diff_flush (diff-tree.c:273)
==13504== by 0x804A225: diff_tree_sha1_top (diff-tree.c:298)
==13504== by 0x804A30B: diff_tree_commit (diff-tree.c:363)
==13504== by 0x804A884: main (diff-tree.c:551)
==13504== Address 0x1BBD7830 is 40 bytes inside a block of size 71 free'd
==13504== at 0x1B9003C3: free (vg_replace_malloc.c:235)
==13504== by 0x805205B: diff_free_filepair (diff.c:775)
==13504== by 0x805422A: diffcore_rename (diffcore-rename.c:415)
==13504== by 0x805249D: diffcore_std (diff.c:1093)
==13504== by 0x8049B48: call_diff_flush (diff-tree.c:273)
==13504== by 0x804A225: diff_tree_sha1_top (diff-tree.c:298)
==13504== by 0x804A30B: diff_tree_commit (diff-tree.c:363)
==13504== by 0x804A884: main (diff-tree.c:551)
==13504==
==13504== Invalid read of size 1
==13504== at 0x1B901423: strcmp (mac_replace_strmem.c:332)
==13504== by 0x8054038: locate_rename_dst (diffcore-rename.c:28)
==13504== by 0x805464B: diffcore_rename (diffcore-rename.c:356)
==13504== by 0x805249D: diffcore_std (diff.c:1093)
==13504== by 0x8049B48: call_diff_flush (diff-tree.c:273)
==13504== by 0x804A225: diff_tree_sha1_top (diff-tree.c:298)
==13504== by 0x804A30B: diff_tree_commit (diff-tree.c:363)
==13504== by 0x804A884: main (diff-tree.c:551)
==13504== Address 0x1BBD7831 is 41 bytes inside a block of size 71 free'd
==13504== at 0x1B9003C3: free (vg_replace_malloc.c:235)
==13504== by 0x805205B: diff_free_filepair (diff.c:775)
==13504== by 0x805422A: diffcore_rename (diffcore-rename.c:415)
==13504== by 0x805249D: diffcore_std (diff.c:1093)
==13504== by 0x8049B48: call_diff_flush (diff-tree.c:273)
==13504== by 0x804A225: diff_tree_sha1_top (diff-tree.c:298)
==13504== by 0x804A30B: diff_tree_commit (diff-tree.c:363)
==13504== by 0x804A884: main (diff-tree.c:551)
==13504==
Perhaps that explains the difference.
-Wayne
next prev parent reply other threads:[~2005-09-14 18:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-14 16:47 git-diff-tree rename detection bug Wayne Scott
2005-09-14 18:09 ` Junio C Hamano
2005-09-14 18:40 ` Wayne Scott [this message]
2005-09-14 20:24 ` Linus Torvalds
2005-09-14 20:41 ` Fix alloc_filespec() initialization Linus Torvalds
2005-09-15 2:23 ` git-diff-tree rename detection bug Paul Mackerras
2005-09-15 2:26 ` Paul Mackerras
2005-09-15 3:36 ` Linus Torvalds
2005-09-15 4:52 ` Paul Mackerras
2005-09-15 8:17 ` Junio C Hamano
2005-09-15 14:49 ` Josef Weidendorfer
2005-09-20 10:50 ` [Valgrind-developers] " Paul Mackerras
2005-09-15 3:29 ` Linus Torvalds
2005-09-16 5:59 ` Junio C Hamano
2005-09-15 5:58 ` H. Peter Anvin
2005-09-15 7:41 ` Junio C Hamano
2005-09-15 14:55 ` Linus Torvalds
2005-09-16 12:53 ` Matthias Urlichs
2005-09-15 20:57 ` Nicolas Pitre
2005-09-14 18:51 ` Junio C Hamano
[not found] ` <59a6e5830509141208282166c8@mail.gmail.com>
2005-09-14 19:19 ` Junio C Hamano
2005-09-14 20:53 ` Linus Torvalds
2005-09-14 21:55 ` Junio C Hamano
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=59a6e583050914114054b1564d@mail.gmail.com \
--to=wsc9tt@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).