Skip to content

Do not store Go pointers in C structs #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2017

Conversation

aykevl
Copy link
Contributor

@aykevl aykevl commented Oct 2, 2017

With Go 1.7, the rules around passing pointers from/to C are even stricter. See e.g. this bug.

When running Go 1.7, this would work before the patch:

go test

But more strict checking fails:

GODEBUG=cgocheck=2 go test

This is fixed with this pull request.
There appear to be more problems in my application seemingly related to golibrsync (fatal error: sweep increased allocation count), but I haven't tracked them down yet.

@silvasur silvasur merged commit c00c43c into silvasur:master Oct 4, 2017
@silvasur
Copy link
Owner

silvasur commented Oct 4, 2017

I really should test my own code more often :|.

Thanks for your fix, merged!

@silvasur
Copy link
Owner

silvasur commented Oct 4, 2017

Regarding the other error ("fatal error: sweep increased allocation count"): I will look into that in more detail on the weekend. Perhaps I can find something.

@aykevl aykevl deleted the fix-pointers-go1.7 branch October 5, 2017 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants