-
Notifications
You must be signed in to change notification settings - Fork 7
panic: runtime error: cgo argument has Go pointer to Go pointer #5
Comments
Yep it is. I haven't looked into the specifics yet and probably won't till the end of next week at the earliest. |
If anyone's interested in taking on this issue or maintaining this package more generally please drop me a note. |
Any update on this? I'm running into the same problem... |
@pieterclaerhout It is as it appears: in need of work. |
Well, same problem here in Go 1.7.3, with almost the same trace: `panic: runtime error: cgo argument has Go pointer to Go pointer goroutine 1 [running]:
Sorry for not being able to help but I am quite new to Linux (and Go) and I am not sure how I could debug this. Anyway, thank for your work: under Windows, it does perform very well ;-) [EDIT] *** WARNING *** The program 'sq' uses the Apple Bonjour compatibility layer of Avahi. I suppose that, as Andrew stated, there is some work to provide... |
@rdeg good to know it still works on Windows. If I were to try getting this going I'd first look back at the 1.6 release notes to review the CGO changes. I'd then write a minimal test using just EDIT: Also you can hide that Avahi warning with an environment variable: |
I have switched to https://github.com/oleksandr/bonjour which does the same for what I need and does work fine on the recent versions of Go. |
Thanks for the Avahi warning tip. The offending instruction is:
in createConnection and, supposedly, in every function in os_unix.go that takes 'ref *uintptr' as a parameter and pass it to a C function (refSockFd, platformDeallocateRef). The point is that Go thinks that ref is a Go pointer to another Go pointer, even if it is a pointer to an uintptr, described as being an integer type in the documentation ("uintptr is an integer type that is large enough to hold the bit pattern of any pointer."). Maybe Go does something wrong here... In case someone is interested in a complete sample of code using your package, I wrote a simple DNS-SD browser in Go [(https://drive.google.com/file/d/0B9hKAVKYGzfUbXluZ1R6LWQtaFk/view?usp=sharing)]. Please be indulgent: it was my first Go program ;-) Have a nice day. |
I opened a PR with a fix for this issue: #6 It's working well on my mac, but I could use some help testing on Windows and other platforms (and with various versions of golang). |
results in
I am using go 1.6, so it might be a change in the way pointers to c are handled.
The text was updated successfully, but these errors were encountered: