-
Notifications
You must be signed in to change notification settings - Fork 7
Description
-
We are facing an issue with CGO runtime error:
cgo argument has Go pointer to unpinned Go pointer
, when we try to integrate bothboringcrypto
&solace-client
libraries. -
We don't see any issue when we tried to link solace-client library without
boringcrypto
. But withboringcrypto
CGO started panic with aUnPin Go pointers
exists at runtime and doesn't allow the application to start. -
We did few investigation to see if the issue is known and resolved by other Go client libraries and found an interesting issues with
imdb-go-client
that claims, if the Go pointer pass to C function and the allocation is done withnew()
then CGO runtime panics with the unsafe pointer. And as resolution to replacenew()
withC.malloc()
. Please check this issue for more details. -
Also, please check this issue that we wanted to understand with
boringcrypto
. [boringcrypto] crypto/tls/fipsonly: panic runtime error: cgo argument has Go pointer to unpinned Go pointer golang/go#64694
Error message
panic: runtime error: cgo argument has Go pointer to unpinned Go pointer
goroutine 1 [running]:
solace.dev/go/messaging/internal/ccsmp.(*SolClientContext).SolClientSessionCreate.func1.1(0x7f78f10cc5b8?, 0x30?, 0xc000640000?, 0xc000aca7e0?)
/go/src/github.com/example/vendor/solace.dev/go/messaging/internal/ccsmp/ccsmp_core.go:265 +0x51solace.dev
/go/messaging/internal/ccsmp.(*SolClientContext).SolClientSessionCreate.func1()
/go/src/github.com/example/vendor/solace.dev/go/messaging/internal/ccsmp/ccsmp_core.go:265 +0x25