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

Re: [PATCH] fast-import: Fix crash when referencing already existing objects

From
Shawn O. Pearce <spearce@spearce.org>
Date
May 24, 2007, 03:44 UTC
Message-ID
<20070524034415.GF28023@spearce.org>
In-Reply-To
<200705232301.49667.simon@lst.de>
Simon Hausmann <simon@lst.de> wrote:
> Commit a5c1780a0355a71b9fb70f1f1977ce726ee5b8d8 sets the pack_id of existing
> objects to MAX_PACK_ID. When the same object is referenced later again it is
> found in the local object hash. With such a pack_id fast-import should not try
> to locate that object in the newly created pack(s).
Thanks, that was a _really_ nasty bug.  :-(

Turns out there's more cases. Such as if we reload a mark table of commits (--import-marks) and then try to create a branch from them. The existing commit will also have a pack_id of MAX_PACK_ID and we'll go right into the same corruption you saw and fixed here.

I will be pushing your two patches and my additional fixup to my maint branch tonight.

-- 
Shawn.
Previous: Simon Hausmann
Message 2 of 2 in “fast-import: Fix crash when referencing already existing objects”
  1. fast-import: Fix crash when referencing already existing objectsSimon Hausmann, May 23, 2007
  2. Shawn O. PearceMay 24, 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.