From: Roman Zippel <zippel@linux-m68k.org>
To: git@vger.kernel.org
Subject: problem in unpack-trees.c
Date: Sun, 3 Dec 2006 02:21:39 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0612022125530.1867@scrub.home> (raw)
Hi,
Git currently fails to succeed the tests as you can see here:
http://buildd.debian.org/fetch.cgi?&pkg=git-core&ver=1%3A1.4.4-2&arch=m68k&stamp=1164303729&file=log
I looked into it and the problem is during the "git-read-tree --reset"
step and it seems that the local df_conflict_entry variable of
unpack_trees() survives past that function. If you check in
add_cache_entry() it's called with this variable and only because
verify_path() fails it's not added to the tree on the other archs, but on
m68k the data on the stack is a bit different and thus verify_path()
succeeds and the stack variable is added to the tree and later saved.
Using the patch below, you can simulate what's happing on m68k and now I
need some help fixing this properly, as I'm not that familiar with the
internals.
Thanks.
bye, Roman
diff -ur git-core-1.4.4.1/unpack-trees.c git-core-1.4.4.1/unpack-trees.c
--- git-core-1.4.4.1/unpack-trees.c 2006-11-23 03:38:07.000000000 +0100
+++ git-core-1.4.4.1/unpack-trees.c 2006-12-03 01:54:04.000000000 +0100
@@ -370,7 +370,10 @@
int i;
struct object_list *posn = trees;
struct tree_entry_list df_conflict_list;
- struct cache_entry df_conflict_entry;
+ static struct {
+ struct cache_entry entry;
+ char name[4];
+ } df_conflict_entry;
memset(&df_conflict_list, 0, sizeof(df_conflict_list));
df_conflict_list.next = &df_conflict_list;
@@ -382,7 +385,8 @@
o->merge_size = len;
memset(&df_conflict_entry, 0, sizeof(df_conflict_entry));
- o->df_conflict_entry = &df_conflict_entry;
+ o->df_conflict_entry = &df_conflict_entry.entry;
+ df_conflict_entry.entry.name[0] = 'x';
if (len) {
posns = xmalloc(len * sizeof(struct tree_entry_list *));
@@ -399,6 +403,7 @@
die("Merge requires file-level merging");
check_updates(active_cache, active_nr, o);
+ memset(&df_conflict_entry, 0x11, sizeof(df_conflict_entry));
return 0;
}
next reply other threads:[~2006-12-03 1:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-03 1:21 Roman Zippel [this message]
2006-12-04 9:53 ` problem in unpack-trees.c Junio C Hamano
2006-12-04 10:00 ` Junio C Hamano
2006-12-04 11:36 ` Roman Zippel
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=Pine.LNX.4.64.0612022125530.1867@scrub.home \
--to=zippel@linux-m68k.org \
--cc=git@vger.kernel.org \
/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).