Skip to content
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

fix issue revealed by tightening of c-go rules #5

Merged
merged 1 commit into from
Mar 26, 2016
Merged

Conversation

jonseymour
Copy link
Contributor

In go1.6, cgo rules regarding the passing of Go pointers to C libraries
changed to prevent unsafe interactions with the Go garbage collector.

We need to change so that we pass an indirect reference to the Go object
to the c-runtime.

This code has been tested to the extent that required to address the
particular panic reported with #4

However, a more extensive regression test has not yet been performed.

Signed-off-by: Jon Seymour [email protected]

@jonseymour
Copy link
Contributor Author

G'day @laibulle . I am not in a position to fully regression test my changes right at the moment. If you can pull this branch and tell me if it this solves the problem for you, please let me know and I'll merge this branch back into master.

I have tested it to the extent that I reproduced the problem with zwcli and then verified that this change avoids the issue.

@jonseymour jonseymour force-pushed the issue-4 branch 2 times, most recently from 62c8441 to 8b2affa Compare March 26, 2016 06:20
@jonseymour jonseymour changed the title workaround tightening of c-go rules fix issue revealed by tightening of c-go rules Mar 26, 2016
In go1.6, cgo rules regarding the passing of Go pointers to C libraries
changed to prevent unsafe interactions with the Go garbage collector.

We need to change so that we pass an indirect reference to the Go object
to the c-runtime.

This code has been tested to the extent that is required to address the
particular panic reported with #4

However, a more extensive regression test has not yet been performed.

Signed-off-by: Jon Seymour <[email protected]>
@laibulle
Copy link

It seems to solve the problem. I can run go-openzwave with go 1.6 but for the moment I just called Configurator.Boot() so it is not a full test.

Thanks

@jonseymour jonseymour merged commit 2df1d95 into master Mar 26, 2016
@jonseymour jonseymour deleted the issue-4 branch March 26, 2016 11:52
@jonseymour
Copy link
Contributor Author

Thanks @laibulle - let me know if you encounter any other issues.

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