I'm pretty new to Go (many years in other languages). I'm trying to use
cgo to use a C library we're using.
I have the following line of code, which is compiling (that's been enough
of a struggle):
status = int(C.VeProtect(C.VeObj(fpeProtect), &argsProtect))
This is failing at runtime with
------------------------
panic serving [::1]:55146: runtime error: cgo argument has Go pointer to Go
pointer goroutine 20 [running]: net/http.(*conn).serve.func1()
/usr/local/go/src/net/http/server.go:1801 +0x13a panic({0xc21cc0,
0xc000093700}) /usr/local/go/src/runtime/panic.go:1047 +0x262 voltagems
/voltagefuncs.protectAndAccess.func1(0x0, 0xc0000b2960)
/media/sf_winhome/git/voltagego/voltagefuncs/voltagefuncs.go:71 +0x90
------------------------
The first thing that's frustrating about this error is that I can't tell
which argument it's talking
about. I would guess it's the first one, as it's more complicated than the
second.
The type of "fpeProtect" is "C.VeFPE", and "C.VeObj" is an alias for
"void*".
And "C.VeFPE" is defined as:
type _Ctype_VeFPE *_Ctype_struct_VeFPE_st
Any suggestions?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/f89005a3-6cbf-4f4c-bc90-3cdb1e6eb87cn%40googlegroups.com.