From: Pavel Roskin <proski@gnu.org>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: Keith Packard <keithp@keithp.com>, git <git@vger.kernel.org>
Subject: Re: parsecvs and unnamed branches
Date: Sat, 17 Jun 2006 00:08:56 -0400 [thread overview]
Message-ID: <1150517336.9144.8.camel@dv> (raw)
In-Reply-To: <9e4733910606162031o69df27fdje50c88949ed990b5@mail.gmail.com>
On Fri, 2006-06-16 at 23:31 -0400, Jon Smirl wrote:
> Parsecvs was compiled '-O2 -g' why didn't it decode the addresses to symbols?
Sorry, I was too quick to put blame on you. Maybe glibc can only list
its own symbols.
I could reproduce the problem trivially with a single file, and here's
what Valgrind says:
==11154== Invalid free() / delete / delete[]
==11154== at 0x4905423: free (vg_replace_malloc.c:233)
==11154== by 0x40C136: git_pack_directory (git.c:620)
==11154== by 0x40C1B4: git_rev_list_pack (git.c:639)
==11154== by 0x4067DA: main (parsecvs.c:785)
git_pack_directory() tries to free() the result of
git_system_to_string(), which is in turn a result of atom(). My
understanding is that atoms should not be freed. They are not freed in
other cases.
Patch:
diff --git a/README b/README
diff --git a/git.c b/git.c
index 33b29c7..7312568 100644
--- a/git.c
+++ b/git.c
@@ -617,7 +617,6 @@ git_pack_directory (void)
}
free (objects_dir);
pack_dir = git_format_command ("%s/objects/pack", git_dir);
- free (git_dir);
if (!pack_dir)
return NULL;
if (access (pack_dir, F_OK) == -1 &&
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2006-06-17 4:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-16 21:44 parsecvs and unnamed branches Jon Smirl
2006-06-16 22:19 ` Keith Packard
2006-06-16 22:28 ` Jon Smirl
2006-06-16 22:39 ` Jon Smirl
2006-06-16 22:51 ` Keith Packard
2006-06-17 3:02 ` Jon Smirl
2006-06-17 3:12 ` Pavel Roskin
2006-06-17 3:31 ` Jon Smirl
2006-06-17 4:08 ` Pavel Roskin [this message]
2006-06-17 4:15 ` Jon Smirl
2006-06-17 4:35 ` Pavel Roskin
2006-06-17 5:30 ` Keith Packard
2006-06-17 5:51 ` Jon Smirl
2006-06-17 17:13 ` Keith Packard
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=1150517336.9144.8.camel@dv \
--to=proski@gnu.org \
--cc=git@vger.kernel.org \
--cc=jonsmirl@gmail.com \
--cc=keithp@keithp.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).