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

Support for go 1.6 #10

Closed
wants to merge 3 commits into from
Closed

Conversation

bendikro
Copy link

This PR adds two commits. One to fix the dreaded panic: runtime error: cgo argument has Go pointer to Go pointer, and one to fix the test TestStackArguments which was fixed by disabling compiler optimizations.

The PR also includes the commit from tiborvass' PR

tiborvass and others added 3 commits February 10, 2016 01:49
In Go 1.6, arguments passed to C cannot be a Go pointer
to memory containing Go pointers.

Fix by converting argument to uintptr instead of unsafe.Pointer
Calling sum8 in TestStackArguments fails apparently due to
compiler optimizations which leads the function return value
to be 0 instead of the expected 36.

Fix by disabling compiler optimizations in CFLAGS
@bendikro bendikro mentioned this pull request Apr 10, 2019
@bendikro
Copy link
Author

The issue with TestStackArguments is caused by a bug which is better solved by a proper bug fix in #11

@bendikro bendikro closed this Apr 10, 2019
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.

3 participants