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

Re: [PATCH 2/3] pack-objects (mingw): demonstrate a segmentation fault with large deltas

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Oct 16, 2018, 23:43 UTC
Message-ID
<20181016234315.GG432229@genre.crustytoothpaste.net>
In-Reply-To
<eb6d10133ac9b1977db81ff9c243e77639226f85.1539723766.git.gitgitgadget@gmail.com>
On Tue, Oct 16, 2018 at 02:02:50PM -0700, Johannes Schindelin via GitGitGadget wrote:
Show 8 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
> 
> There is a problem in the way 9ac3f0e5b3e4 (pack-objects: fix
> performance issues on packing large deltas, 2018-07-22) initializes that
> mutex in the `packing_data` struct. The problem manifests in a
> segmentation fault on Windows, when a mutex (AKA critical section) is
> accessed without being initialized. (With pthreads, you apparently do
> not really have to initialize them?)

This is a good catch. You do have to initialize a pthread mutex, but on amd64 Linux the default initializer is all zeros, so since we use a static variable, it happens to coincidentally have the right value, so we don't notice.

Thanks for fixing this.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Schindelin via GitGitGadget
Message 4 of 6 in “Fix gc segfault”
  1. 0/3 Fix gc segfaultJameson Miller via GitGitGadget, Oct 16, 2018
  2. 1/3 Fix typo 'detla' -> 'delta'Johannes Schindelin via GitGitGadget, Oct 16, 2018
  3. 2/3 pack-objects (mingw): demonstrate a segmentation fault with large deltasJohannes Schindelin via GitGitGadget, Oct 16, 2018
  4. brian m. carlsonOct 16, 2018
  5. 3/3 pack-objects (mingw): initialize `packing_data` mutex in the correct spotJohannes Schindelin via GitGitGadget, Oct 16, 2018
  6. Jeff KingOct 17, 2018

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.