From a8ea1b7a5580bc4377818fb6718d55d4b735dae8 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Mon, 5 Mar 2012 14:48:49 +0100 Subject: [PATCH 1/2] fast-import: zero all of 'struct tag' to silence valgrind When running t9300, valgrind (correctly) complains about an uninitialized value in write_crash_report: ==2971== Use of uninitialised value of size 8 ==2971== at 0x4164F4: sha1_to_hex (hex.c:70) ==2971== by 0x4073E4: die_nicely (fast-import.c:468) ==2971== by 0x43284C: die (usage.c:86) ==2971== by 0x40420D: main (fast-import.c:2731) ==2971== Uninitialised value was created by a heap allocation ==2971== at 0x4C29B3D: malloc (vg_replace_malloc.c:263) ==2971== by 0x433645: xmalloc (wrapper.c:35) ==2971== by 0x405DF5: pool_alloc (fast-import.c:619) ==2971== by 0x407755: pool_calloc.constprop.14 (fast-import.c:634) ==2971== by 0x403F33: main (fast-import.c:3324) Fix this by zeroing all of the 'struct tag'. We would only need to zero out the 'sha1' field, but this way seems more future-proof. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- fast-import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fast-import.c b/fast-import.c index 6cd19e580..c1486cabb 100644 --- a/fast-import.c +++ b/fast-import.c @@ -2712,7 +2712,7 @@ static void parse_new_tag(void) /* Obtain the new tag name from the rest of our command */ sp = strchr(command_buf.buf, ' ') + 1; t = pool_alloc(sizeof(struct tag)); - t->next_tag = NULL; + memset(t, 0, sizeof(struct tag)); t->name = pool_strdup(sp); if (last_tag) last_tag->next_tag = t; From 69f4e08f535d4e5a035069a64d1ebaea7be55d83 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 5 Mar 2012 14:29:07 -0800 Subject: [PATCH 2/2] Git 1.7.9.3 Signed-off-by: Junio C Hamano --- Documentation/git.txt | 3 ++- GIT-VERSION-GEN | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/git.txt b/Documentation/git.txt index 22fadeb11..b257d80c7 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -44,9 +44,10 @@ unreleased) version of git, that is available from 'master' branch of the `git.git` repository. Documentation for older releases are available here: -* link:v1.7.9.2/git.html[documentation for release 1.7.9.2] +* link:v1.7.9.3/git.html[documentation for release 1.7.9.3] * release notes for + link:RelNotes/1.7.9.3.txt[1.7.9.3], link:RelNotes/1.7.9.2.txt[1.7.9.2], link:RelNotes/1.7.9.1.txt[1.7.9.1], link:RelNotes/1.7.9.txt[1.7.9]. diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index a6b6db79f..de203dd28 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.7.9.2 +DEF_VER=v1.7.9.3 LF=' '