Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: spurious cgo dynamic check failure on darwin/amd64 #17160
On darwin/amd64, several uses of
Calling a C helper function, C.freestr(cstr), does not get caught.
I spent a while trying to isolate a test case, but no luck. Once I've mailed the darwin plugin CLs, replacing C.freestr with C.free shows the error consistently when running misc/cgo/testplugin.
Patch set 3 of CL 29394 addresses this.
When I opened this bug I had written off dlopen being the cause because the stack trace pointed to the first C.free in the function. Of course that C.free was in a defer, so it happened after the dlopen. For some reason it took me a while to see that.