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

Runtime panic with go 1.6 #4

Closed
laibulle opened this issue Mar 25, 2016 · 3 comments
Closed

Runtime panic with go 1.6 #4

laibulle opened this issue Mar 25, 2016 · 3 comments

Comments

@laibulle
Copy link

Not sure if this package is still maintained.

When I use go 1.5, the library seems to work. But with go 1.6 I get this error

panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 8 [running]:
panic(0x40fa8e0, 0xc82000a2e0)
    /usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6
github.com/ninjasphere/go-openzwave._cgoCheckPointer0(0x40d1a00, 0xc8200600c0, 0x0, 0x0, 0x0, 0x0)
    ??:0 +0x4d
github.com/ninjasphere/go-openzwave.(*api).Run.func2(0xc8200600c0, 0xc820056150)
    /Users/laibulle/Eliocity/www/go/src/github.com/ninjasphere/go-openzwave/run.go:113 +0x62
created by github.com/ninjasphere/go-openzwave.(*api).Run
    /Users/laibulle/Eliocity/www/go/src/github.com/ninjasphere/go-openzwave/run.go:198 +0x178
exit status 2
@jonseymour
Copy link
Contributor

Thanks @laibulle I will have a look at it.

@jonseymour
Copy link
Contributor

Seems I have fallen foul of this change - golang/go#12416 . I will have to re-examine how I share a references to go structures with the C world.

jonseymour pushed a commit that referenced this issue 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 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 pushed a commit that referenced this issue 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]>
jonseymour pushed a commit that referenced this issue 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]>
jonseymour pushed a commit that referenced this issue 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]>
@jonseymour
Copy link
Contributor

Closed via #5

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

No branches or pull requests

2 participants