You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmm, we're not supposed to care about the repository having a workdir, and I think that your proposed fix leaks the git_repository memory on bare repositories (ie. whenever workdir would have been NULL).
How you've constructed the GTRepository/git_repository itself would be most helpful, right now this could also just be a stray memory write corrupting something in the git_repository. If it's openen from a worktree (a.k.a git worktree list), or a worktree on a bare repo, would also help, as there had been a few issues in libgit2 itself.
Is that specific to a given repository, or does it happen on any of them ? Could you whip up a test case maybe ?
I don't understand what you mean by Opaque Pointer, and there are a few different ways to get to a GTRepository, some which might not be well-supported (usinggit_repository_new() is the one I'd be surprised would work, or some edge-cases of git_submodule_open). The others should be okay. I just want to clarify if you're only going through Objective-C or if you're somehow customizing something.
The OpaquePointer I’m talking about is created by SwiftGit2, a small git library for Swift.
My project is written in Swift, but I’m able to use Objective Git, as Swift runs on the ObjC runtime.
Activity
Fixes crash described by libgit2#689
arguiot commentedon May 16, 2019
Actually, I sent a PR: #690
tiennou commentedon May 20, 2019
Hmm, we're not supposed to care about the repository having a workdir, and I think that your proposed fix leaks the
git_repositorymemory on bare repositories (ie. whenever workdir would have beenNULL).How you've constructed the GTRepository/git_repository itself would be most helpful, right now this could also just be a stray memory write corrupting something in the git_repository. If it's openen from a worktree (a.k.a
git worktree list), or a worktree on a bare repo, would also help, as there had been a few issues in libgit2 itself.arguiot commentedon May 22, 2019
I’m using an Opaque Pointer to create my GTRepository. I will try with a URL, to see if anything changes
tiennou commentedon May 22, 2019
Is that specific to a given repository, or does it happen on any of them ? Could you whip up a test case maybe ?
I don't understand what you mean by Opaque Pointer, and there are a few different ways to get to a GTRepository, some which might not be well-supported (using
git_repository_new()is the one I'd be surprised would work, or some edge-cases ofgit_submodule_open). The others should be okay. I just want to clarify if you're only going through Objective-C or if you're somehow customizing something.arguiot commentedon May 22, 2019
The OpaquePointer I’m talking about is created by SwiftGit2, a small git library for Swift.
My project is written in Swift, but I’m able to use Objective Git, as Swift runs on the ObjC runtime.