-
Notifications
You must be signed in to change notification settings - Fork 2.5k
git_repository_open, given a nonexistent path, trashes pthread_self
on macOS/ARM64
#6871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'll take a look, but you must call So I suspect that adding That said, we aim to fail nicely here when |
It also seems like we should add some additional documentation to the primary entry points for the application, in the |
Ah, you're quite correct of course, adding the call to I did start by looking for docs or a tutorial, but only found a giant reference document with hundreds of functions, so I just started guessing names... Thank you! Feel free to close the issue (or not!) as you see fit. |
Thanks for the update! I will leave this open so that I can:
|
Reproduction steps
I'm using the libgit2 from homebrew, but the version Apple ships with Xcode also has the problem:
Running the test program on /usr succeeds, but on /foo fails:
Expected behavior
git_repository_open
should not trash memoryActual behavior
Pretty sure
git_repository_open
is trashing memory! At the least, it's somehow triggering pthread_self's internal safety check, probably this one: https://github.com/apple/darwin-libpthread/blob/main/src/inline_internal.h#L177Version of libgit2 (release number or SHA1)
1.8.1
Operating system(s) tested
macOS Sonoma 14.6.1
The text was updated successfully, but these errors were encountered: