Closed alexbrainman closed 8 years ago
Am I reading this right that it's a bug in cgo that has since been fixed? I am guessing we'll see it in the next release of Go. https://github.com/golang/go/issues/14483
In the meantime, I can still use this library with the GODEBUG=cgocheck=0
environment variable.
Thank you
Am I reading this right that it's a bug in cgo that has since been fixed?
Kind of, but not really.
I am using current tip that has golang/go#14483 fixed, but I see the above crash just the same.
The crash is inside of CGO runtime checker that has been introduce in go1.6 (see https://golang.org/doc/go1.6#cgo for details). And while golang/go#14483 is based on this issue, these two issues are not exactly the same. Perhaps there is more to learn from my crash on the tip for the CGO runtime checker, but I don't have time to chase that. I will try to change my code to silence it instead.
I must also point that CGO runtime checker is complaining here for a reason - we have Go memory block that is written by external code long after call into external code returned. This breaks one of new CGO safety rules. But windows syscalls break these rules too, and Go does not have any solution for that yet. A lot of windows programs will break, if Go runtime will start using tricks that CGO "safety" rules are trying to allow. So I am not sure I will employ "proper" solution just yet. I don't know what needs to be done for windows yet.
In the meantime, I can still use this library with the GODEBUG=cgocheck=0 environment variable.
Yes. That does the trick. But inconvenient.
Alex
To reproduce the issue:
It seems like new Go cgo function parameter checker is unhappy with something.
Alex