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

Re: [PATCH] Fix segfault in diff-delta.c when FLEX_ARRAY is 1

From
Pierre Habouzit <madcoder@debian.org>
Date
Dec 18, 2007, 01:44 UTC
Message-ID
<20071218014455.GB14981@artemis.madism.org>
In-Reply-To
<1197941997-11421-1-git-send-email-madcoder@debian.org>
On Tue, Dec 18, 2007 at 01:39:57AM +0000, Pierre Habouzit wrote:
> aka don't do pointer arithmetics on structs that have a FLEX_ARRAY member,
> or you'll end up believing your array is 1 cell off its real address.
  I wonder if we could teach sparse to prevent us from using pointer
arithmetics on some types… because I obviously didn't read all the git
code, and I wouldn't be surprised an instance of this still remains
somehwere.
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Pierre HabouzitNext: Linus Torvalds
Message 2 of 7 in “Fix segfault in diff-delta.c when FLEX_ARRAY is 1”
  1. Fix segfault in diff-delta.c when FLEX_ARRAY is 1Pierre Habouzit, Dec 18, 2007
  2. Pierre HabouzitDec 18, 2007
  3. Linus TorvaldsDec 18, 2007
  4. Linus TorvaldsDec 18, 2007
  5. Junio C HamanoDec 18, 2007
  6. David KastrupDec 18, 2007
  7. Nicolas PitreDec 18, 2007

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.