From: Thomas Rast <trast@inf.ethz.ch>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: What's cooking in git.git (May 2013, #09; Wed, 29)
Date: Thu, 30 May 2013 11:47:14 +0200 [thread overview]
Message-ID: <87bo7slrz1.fsf@linux-k42r.v.cablecom.net> (raw)
In-Reply-To: <7va9ndqqyf.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Wed, 29 May 2013 16:58:00 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> * rr/die-on-missing-upstream (2013-05-22) 2 commits
> - sha1_name: fix error message for @{<N>}, @{<date>}
> - sha1_name: fix error message for @{u}
>
> When a reflog notation is used for implicit "current branch", we
> did not say which branch and worse said "branch ''".
>
> Will merge to 'next'.
This interacts with the tests from
> * fc/at-head (2013-05-08) 13 commits
to fail valgrind in t1508 like so:
==22927== Invalid read of size 1
==22927== at 0x4C2C71B: __GI_strnlen (mc_replace_strmem.c:377)
==22927== by 0x567FF6B: vfprintf (in /lib64/libc-2.17.so)
==22927== by 0x56AC194: vsnprintf (in /lib64/libc-2.17.so)
==22927== by 0x4EAC39: vreportf (usage.c:12)
==22927== by 0x4EACA4: die_builtin (usage.c:36)
==22927== by 0x4EAEE0: die (usage.c:103)
==22927== by 0x4D8C51: get_sha1_1 (sha1_name.c:542)
==22927== by 0x4D8E5D: get_sha1_with_context_1 (sha1_name.c:1299)
==22927== by 0x4D992A: get_sha1_with_context (sha1_name.c:1417)
==22927== by 0x4D99E1: get_sha1 (sha1_name.c:1124)
==22927== by 0x45E1AC: cmd_rev_parse (rev-parse.c:761)
==22927== by 0x4051B3: handle_internal_command (git.c:284)
==22927== Address 0x5bebccb is 11 bytes inside a block of size 22 free'd
==22927== at 0x4C2ACDA: free (vg_replace_malloc.c:468)
==22927== by 0x4D8C37: get_sha1_1 (sha1_name.c:541)
==22927== by 0x4D8E5D: get_sha1_with_context_1 (sha1_name.c:1299)
==22927== by 0x4D992A: get_sha1_with_context (sha1_name.c:1417)
==22927== by 0x4D99E1: get_sha1 (sha1_name.c:1124)
==22927== by 0x45E1AC: cmd_rev_parse (rev-parse.c:761)
==22927== by 0x4051B3: handle_internal_command (git.c:284)
==22927== by 0x4053E7: main (git.c:492)
I think it's enough to squash this little change; leaking some memory
immediately before die() is not too bad, especially if we're going to
pass real_ref+11 into die()...
diff --git i/sha1_name.c w/sha1_name.c
index 5ea16ff..a07558d 100644
--- i/sha1_name.c
+++ w/sha1_name.c
@@ -538,7 +538,6 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
"back to %s.", len, str,
show_date(co_time, co_tz, DATE_RFC2822));
else {
- free(real_ref);
die("Log for '%.*s' only has %d entries.",
len, str, co_cnt);
}
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2013-05-30 9:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-29 23:58 What's cooking in git.git (May 2013, #09; Wed, 29) Junio C Hamano
2013-05-30 9:47 ` Thomas Rast [this message]
2013-05-30 9:56 ` Ramkumar Ramachandra
2013-06-02 23:44 ` Junio C Hamano
2013-05-30 19:18 ` Jens Lehmann
2013-06-02 18:50 ` Junio C Hamano
2013-06-03 21:27 ` Jens Lehmann
2013-07-01 22:05 ` Junio C Hamano
2013-05-30 19:23 ` Jens Lehmann
2013-05-31 19:40 ` John Keeping
2013-06-03 14:54 ` John Keeping
2013-06-03 15:30 ` Junio C Hamano
2013-06-03 21:47 ` Jens Lehmann
2013-06-03 22:23 ` John Keeping
2013-06-04 5:29 ` Heiko Voigt
2013-06-04 8:10 ` John Keeping
2013-06-04 11:17 ` Heiko Voigt
2013-06-04 12:48 ` John Keeping
2013-06-04 21:39 ` Jens Lehmann
2013-06-04 22:04 ` John Keeping
2013-06-04 22:57 ` Re: " Phil Hord
2013-06-05 8:19 ` John Keeping
2013-05-31 6:16 ` Øystein Walle
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=87bo7slrz1.fsf@linux-k42r.v.cablecom.net \
--to=trast@inf.ethz.ch \
--cc=artagnon@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.