git2go should ensure -DGIT_THREADS was used for libgit2 #329

Closed
opened 2016-07-26 09:31:01 -05:00 by hanwen · 2 comments
hanwen commented 2016-07-26 09:31:01 -05:00 (Migrated from github.com)

It's apparently possible to link libgit2 into a git2go binary, with thread-safety switched off. For git2go this does not make any sense; git2go should crash if libgit2 wasn't compiled with -DGIT_THREADS.

It's apparently possible to link libgit2 into a git2go binary, with thread-safety switched off. For git2go this does not make any sense; git2go should crash if libgit2 wasn't compiled with -DGIT_THREADS.
carlosmn commented 2016-07-28 17:59:11 -05:00 (Migrated from github.com)

You would have to choose to build your shared libgit2 without threading support, which would already indicate your choice not to run anything with threads, so I'm not sure how that happens accidentally with anything more-or-less recently.

But yes, that doesn't make a lot of sense with Go. It probably make sense to check for the threading capability and error out (maybe the only option is panic?) if we link against a version without it.

You would have to choose to build your shared libgit2 without threading support, which would already indicate your choice not to run anything with threads, so I'm not sure how that happens accidentally with anything more-or-less recently. But yes, that doesn't make a lot of sense with Go. It probably make sense to check for the threading capability and error out (maybe the only option is panic?) if we link against a version without it.
carlosmn commented 2016-12-23 16:21:31 -06:00 (Migrated from github.com)

Fixed via #354

Fixed via #354
Sign in to join this conversation.
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#329
No description provided.