I have a byte.Buffer that I pack with data using the binary.Write() function. I then need to send this byte array to a C function. Using Go 1.6 I have not been successful at fig
Your program crashes because rules of passing pointers into C changed in go1.6 (see https://tip.golang.org/doc/go1.6#cgo for details).
I don't know why your program crashes, so I have created Go issue https://github.com/golang/go/issues/14546.
But regardless of answer on the issue, I wouldn't use internal bits of bytes.Buffer (as you do) to pass into cgo directly. The bytes.Buffer implementation can change in the future, and you program will start breaking mysteriously. I would just copy data you need into whatever structure is appropriate and use that to pass into cgo.