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

Re: [PATCH 0/2] Fix memory corruption with FSMonitor-enabled unpack_trees()

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 19, 2021, 14:49 UTC
Message-ID
<nycvar.QRO.7.76.6.2103191546190.57@tvgsbejvaqbjf.bet>
In-Reply-To
<07a368ee-6b45-a401-32c3-c052370150f5@gmail.com>
Hi Stolee,
On Wed, 17 Mar 2021, Derrick Stolee wrote:
Show 5 quoted lines
> On 3/17/2021 11:30 AM, Johannes Schindelin via GitGitGadget wrote:
> > While dog-fooding Jeff Hostetler's FSMonitor patches, I ran into a really
> > obscure segmentation fault during one of my epic Git for Windows rebases.
>
> Thanks for dogfooding!

I'm completely selfish here, as I want to benefit from the speed myself, and that's also the reason why I added this as an experimental option to Git for Windows v2.31.0: That way, I can test it everywhere (and so can others).

> > Turns out that this bug is quite old.
>
> A little over a year, yes, since the v2 hook was committed. It's old
> enough that these could be applied to 'maint'.

Indeed. Even better: if you look closely at the GitGitGadget PR, you will see that I based it on `kw/fsmonitor-watchman-racefix`.

Show 8 quoted lines
> > Johannes Schindelin (2):
> >   fsmonitor: fix memory corruption in some corner cases
> >   fsmonitor: do not forget to release the token in `discard_index()`
>
> The patches themselves are correct and describe the problem well.
> They only show up during non-trivial uses of FS Monitor and index
> updates, so I understand your hesitance to write tests that trigger
> these problems.

Right. For me, I ran into them only in one specific instance, when rebasing Git for Windows' patch thicket onto `seen`, and then only when merging a topic branch with a rather big diff.

Thanks, Dscho

Previous: Derrick Stolee
Message 6 of 6 in “Fix memory corruption with FSMonitor-enabled unpack_trees()”
  1. 0/2 Fix memory corruption with FSMonitor-enabled unpack_trees()Johannes Schindelin via GitGitGadget, Mar 17, 2021
  2. 1/2 fsmonitor: fix memory corruption in some corner casesJohannes Schindelin via GitGitGadget, Mar 17, 2021
  3. Junio C HamanoMar 17, 2021
  4. 2/2 fsmonitor: do not forget to release the token in `discard_index()`Johannes Schindelin via GitGitGadget, Mar 17, 2021
  5. Derrick StoleeMar 17, 2021
  6. Johannes SchindelinMar 19, 2021

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.