microsoft / git

A fork of Git containing Microsoft-specific patches.
http://git-scm.com/
Other
761 stars 92 forks source link

Fix sparse-checkout crash due to custom virtual filesystem patches #639

Closed derrickstolee closed 5 months ago

derrickstolee commented 5 months ago

This fixup! commit updates an old virtual filesystem patch to only check its custom logic if the virtual filesystem is enabled. When not enabled, the call to resolve_dtype() could cause a sparse-index expansion (ensure_full_index()) during an existing scan of the index, leading to use-after-free violations.

I verified that my local version with this fix avoids the crash in the case of the Office monorepo.

derrickstolee commented 5 months ago

@dscho @jeffhostetler: The osx-(clang|gcc) test failures seem pretty consistent across three rebuilds, but also unrelated to my changes. Any idea what's going on there?

dscho commented 5 months ago

@dscho @jeffhostetler: The osx-(clang|gcc) test failures seem pretty consistent across three rebuilds, but also unrelated to my changes. Any idea what's going on there?

I think https://github.com/microsoft/git/pull/640 will fix this.

haeminlee0630 commented 5 months ago

@dscho @jeffhostetler it does look like at least one of the CI/osx-clang tests remain failing even after https://github.com/microsoft/git/pull/640 was merged this morning. Any thoughts about this?

dscho commented 5 months ago

@dscho @jeffhostetler it does look like at least one of the CI/osx-clang tests remain failing even after #640 was merged this morning. Any thoughts about this?

I think it simply did not synchronize with the newest vfs-2.44.0 commit, probably because they did not clash with the changes in this here PR. I've rebased onto the newest vfs-2.44.0 commit, now CI should pass.