Re: general protection faults with "git grep" version 1.7.7.1
On Tue, Oct 25, 2011 at 03:50:21PM +0200, Thomas Rast wrote:
Show 8 quoted lines
> 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