KeepAlive all the things #393

Merged
carlosmn merged 5 commits from cmn/keepalive-all-the-things into master 2017-07-08 09:51:22 -05:00
carlosmn commented 2017-07-08 09:11:40 -05:00 (Migrated from github.com)

Newer Go runtimes' GC is particularly eager and doesn't even consider the receiver as a reference. Thus in order for structs wrapping the pointers not to be freed while in the middle of us using them in a function call, we must make sure that the wrapping struct is kept alive until after we return from.

This seems to be the cause of #352, #334 and #356 and this should fix the other places where this might happen.

Newer Go runtimes' GC is particularly eager and doesn't even consider the receiver as a reference. Thus in order for structs wrapping the pointers not to be freed while in the middle of us using them in a function call, we must make sure that the wrapping struct is kept alive until after we return from. This seems to be the cause of #352, #334 and #356 and this should fix the other places where this might happen.
odeke-em commented 2017-09-03 23:42:36 -05:00 (Migrated from github.com)

@carlosmn thank you for working on this, for all the work and maintaining git2go!

I am checking in, having been paged in by @josharian who is currently on leave and away from his computer. By Newer Go runtimes' GC what would the older version be? I ask because the spread of versions in the closed issues is diverse, ranging from Go1.6 to Go1.8Beta1

Issue GoVersion
https://github.com/libgit2/git2go/issues/352 Go1.6
https://github.com/libgit2/git2go/issues/334 Unspecified
https://github.com/libgit2/git2go/issues/356 Go1.7.4 and Go1.8Beta1
@carlosmn thank you for working on this, for all the work and maintaining git2go! I am checking in, having been paged in by @josharian who is currently on leave and away from his computer. By `Newer Go runtimes' GC` what would the older version be? I ask because the spread of versions in the closed issues is diverse, ranging from Go1.6 to Go1.8Beta1 Issue|GoVersion ---|--- https://github.com/libgit2/git2go/issues/352|Go1.6 https://github.com/libgit2/git2go/issues/334|Unspecified https://github.com/libgit2/git2go/issues/356|Go1.7.4 and Go1.8Beta1
carlosmn commented 2017-09-05 06:32:01 -05:00 (Migrated from github.com)

AFAICT it was Go 1.6 which introduced the more eager garbage collector, but each version brings its own GC changes.

AFAICT it was Go 1.6 which introduced the more eager garbage collector, but each version brings its own GC changes.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: jcarr/git2go#393
No description provided.