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: runtime error: cgo argument has Go pointer to Go pointer #14483
Comments
I believe this is because the 8 bytes are in the same memory allocation, contiguous with the pointer in the slice of the |
Hmmm, it works fine if you remove the |
It does indeed. Alex |
@bradfitz By the way, this kind of thing is supposed to work if the address operation is one of the direct arguments to the C call. In that specific case, cgo is supposed to know that only that particular field needs to be checked for pointers, not the entire object to which the pointer points. |
CL https://golang.org/cl/19860 mentions this issue. |
CL https://golang.org/cl/22041 mentions this issue. |
Fixes #14483. Change-Id: I0cddfe27fd8d00ba85659d0b618410e39ebf45cb Reviewed-on: https://go-review.googlesource.com/19860 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-on: https://go-review.googlesource.com/22041 Reviewed-by: Ian Lance Taylor <iant@golang.org>
I had a crash alexbrainman/odbc#65 after compiling my program with latest version of Go.
I simplified my crash down to this:
I don't undestand what this program doing wrong that CGO function parmeter checker crashed it. Can someone explain it to me, please? Also, if I remove line 22, the program runs with no problem. Why?
Thank you.
I suspect @ianlancetaylor will be interested.
Alex
The text was updated successfully, but these errors were encountered: