git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: general protection faults with "git grep" version 1.7.7.1

From
Jeff King <peff@peff.net>
Date
Oct 25, 2011, 15:37 UTC
Message-ID
<20111025153720.GA6640@sigill.intra.peff.net>
In-Reply-To
<201110251550.22248.trast@student.ethz.ch>
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
Previous: Jim Meyering
Message 15 of 15 in “general protection faults with "git grep" version 1.7.7.1”
  1. Markus TrippelsdorfOct 24, 2011
  2. Richard W.M. JonesOct 24, 2011
  3. Markus TrippelsdorfOct 24, 2011
  4. Bernt HansenOct 25, 2011
  5. Jeff KingOct 25, 2011
  6. Bernt HansenOct 25, 2011
  7. Thomas RastOct 25, 2011
  8. Jim MeyeringOct 25, 2011
  9. Markus TrippelsdorfOct 25, 2011
  10. Thomas RastOct 25, 2011
  11. Thomas RastOct 25, 2011
  12. Jim MeyeringOct 25, 2011
  13. Thomas RastOct 25, 2011
  14. Jim MeyeringOct 25, 2011
  15. Jeff KingOct 25, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.