Closed
Description
Using the Go 1.5 compiler toolchain and compiling a binary that uses CGO and then codesign
ing that binary, upon attempting to execute the program it will be killed immediately by the system. Codesigning a non-cgo binary works just fine, as expected.
Given the following small program:
package main
/*
int
cfunc() {
return 2;
}
*/
import "C"
import "fmt"
func main() {
fmt.Println("cfunc says:", C.cfunc())
}
and building simply with go build
and running codesign -f -s my_cert ./myprog
, when attempting to execute the program in a shell the response is "killed: ./myprog".
The system log reports:
$ taskgated[92]: no signature for pid=1991 (cannot make code: UNIX[No such process])
Tested against Go1.5beta2 and:
$ go version devel +765cea2 Mon Jul 27 18:03:45 2015 +0000 darwin/amd64