git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Thomas Rast <trast@student.ethz.ch>
Cc: "Richard W.M. Jones" <rjones@redhat.com>,
	Markus Trippelsdorf <markus@trippelsdorf.de>,
	meyering@redhat.com, git@vger.kernel.org,
	"Shawn O. Pearce" <spearce@spearce.org>,
	Nicolas Pitre <nico@fluxnic.net>
Subject: Re: general protection faults with "git grep" version 1.7.7.1
Date: Tue, 25 Oct 2011 08:37:20 -0700	[thread overview]
Message-ID: <20111025153720.GA6640@sigill.intra.peff.net> (raw)
In-Reply-To: <201110251550.22248.trast@student.ethz.ch>

On Tue, Oct 25, 2011 at 03:50:21PM +0200, Thomas Rast wrote:

> That being said, I'm not entirely convinced that the code in
> builtin/grep.c works in the face of memory pressure.  It guards
> against concurrent access to read_sha1_file() with the
> read_sha1_mutex, but any call to xmalloc() outside of that mutex can
> still potentially invoke the try_to_free_routine.  Maybe one of the
> pack experts can say whether this is safe.  (However, I implemented
> locking around try_to_free_routine as a quick hack and it did not fix
> the issue discussed in the bug report.)

Yes, I think it needs to set try_to_free_routine. See this thread:

  http://thread.gmane.org/gmane.comp.version-control.git/180446

which discusses a possible subtlety with doing so.

-Peff

      parent reply	other threads:[~2011-10-25 15:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-24 20:11 general protection faults with "git grep" version 1.7.7.1 Markus Trippelsdorf
2011-10-24 21:49 ` Richard W.M. Jones
2011-10-24 22:58   ` Markus Trippelsdorf
2011-10-25  0:00     ` Bernt Hansen
2011-10-25  5:53       ` Jeff King
2011-10-25 11:11         ` Bernt Hansen
2011-10-25 13:50   ` Thomas Rast
2011-10-25 15:17     ` Jim Meyering
2011-10-25 15:32       ` Markus Trippelsdorf
2011-10-25 16:00       ` Thomas Rast
2011-10-25 16:07         ` Thomas Rast
2011-10-25 16:37         ` Jim Meyering
2011-10-25 16:54           ` Thomas Rast
2011-10-25 20:24             ` Jim Meyering
2011-10-25 15:37     ` Jeff King [this message]

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=20111025153720.GA6640@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=markus@trippelsdorf.de \
    --cc=meyering@redhat.com \
    --cc=nico@fluxnic.net \
    --cc=rjones@redhat.com \
    --cc=spearce@spearce.org \
    --cc=trast@student.ethz.ch \
    /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).