Repository navigation
git: fix darwin crashes when dealing with unicode filenames - #540166
Conversation
|
Can you link me a little more detail here? |
|
@philiptaron the patch leads to the discussion, here's the link: https://lore.kernel.org/git/[email protected] I updated the description with the gist. |
me-and
left a comment
There was a problem hiding this comment.
LGTM.
I'm running some aarch64-linux tests just for good measure, but given x86_64-linux has apparently built successfully, I don't think there's any need to wait for those.
c25216e to
8faec7a
Compare
|
@me-and ping? |
Do you want me to re-review? I don't have the privs to actually do the merge... |
|
@me-and Ah! This PR is sent by a committer which is why it's labeled as "merge bot eligible", meaning you as the package maintainer CAN merge it. You may want to refresh on the bot functionality, it's actually quite useful, I used it all the time before I had the bit! Anyway, since you seem to support merging it, I will do it myself. Thanks for the review and quick reply! |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin staging-26.05
git worktree add -d .worktree/backport-540166-to-staging-26.05 origin/staging-26.05
cd .worktree/backport-540166-to-staging-26.05
git switch --create backport-540166-to-staging-26.05
git cherry-pick -x 8faec7a14645ab696e6631426e2cc4d915ae1202 |
|
Manually backporting: #553413 |
The backported patch is accepted in
next.Note:
aarch64-darwinbuild was executed onmaster, notstagingbecause currentlygitbuild is blocked byjemalloctest suite failures.The gist is that we enabled additional FORTIFY rules recently, which triggered
gitcrashes on Darwin because of array size enforcement on an array that is defined as[NAME_MAX+1]-sized in (darwin-specific) code but in reality is expanded further withreallocas needed by the implementation. The compiler still sees[NAME_MAX+1]as the threshold to enforce and makesgitcrash if an attempt to write beyond it is detected.The specific scenario when
gitmay crash is when it encounters a file name that is longer thanNAME_MAX+1bytes (in NFD UTF-8 encoding) - a real and common scenario on MacOS. (On Linux, it's still possible butgitcode correctly deals with it for this platform. Hence the issue is Darwin specific.) (In case you wonder why NAME_MAX is not the real limit for a file name length... here)The patch does not introduce runtime changes, only helps the compiler to know that it's dealing with a flexible array.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.