-
Notifications
You must be signed in to change notification settings - Fork 285
Description
We're seeing what appears to be a segfault in the check_connection
method, i.e. rb_git_remote_check_connection
. The error is check_connection munmap_chunk(): invalid pointer
. Near as I can tell this happens when you try free something that wasn't malloc'ed.
https://github.com/libgit2/rugged/blob/master/ext/rugged/rugged_remote.c#L503-L539
Looking at that can we confirm that the xfree
is only freeing things that were xmalloced? Also, should the code only call git_remote_disconnect
if the connection actually happened?
Unfortunately, we have not been able to duplicate this in a standalone script. It seems to happen when the network goes down after previously successful connections.
Here is the actual code that triggered it:
More information:
https://bugzilla.redhat.com/show_bug.cgi?id=1835226
cc @NickLaMuro, @d-m-u