Do not double free during callbacks.#338
Do not double free during callbacks.#338johnhaley81 merged 2 commits intonodegit:masternodegit/nodegit:masterfrom
Conversation
|
For completeness sake, I think we should wrap that free in an if block to check if it needs to be freed in the first place and probably even set the |
|
Done |
|
I am getting some test failures locally, but on travis is fine. Here are the relevant tests: |
|
Do you get those consistently? If they are timeouts then there might be something else going on. The PR looks good though. |
|
Now I can't run them at all. Anyway, if it looks good, then go ahead :). I can confirm that it works for me and solves the issue. |
|
Ok, they started, but the timeouts are coming out consistently. |
|
They all pass locally for me so I think we're good. Nice job man! |
Do not double free during callbacks.
|
Thanks for maintaining this, it's so helpful! |
|
np man! Just wish I had more time :) |
|
Can we get this released? Any other PRs you want in before release that I can help you with? |
|
I was hoping to get in #336 before we version bumped but that PR can't be closed until libgit2 goes to 0.21.4. We could do multiple ones though if this is holding you back. |
|
Not really, we are pinned to 0.2.3 :). |
Continuing from #331, as it is a different issue.
Here is the backtrace obtained via lldb:
Here is the relevant part of commit.cc in which the error happen:
Adding this line before the first free fixes it.
I did that in the templates. Let me know if it is ok, or if I should change something.
I can even add a unit test, but I might need some pointers in how catch the issue in the smallest case.