使用go例程和变量时进行go插件核心转储

I am unable to use variables inside my go routine started in a go plugin. The following code is an example of what I am trying to do.

The code

// Can be an non-empty struct as well
var channel = make(chan string) 
log.Println(channel) 
go func(ch chan string) { 
    log.Println(ch) 
}(channel)

crahes with a coredump when executed in a go plugin on darwin.

-Yes Go plugins work on darwin: http://prntscr.com/iq8czy

I recently reported this issue to golang: Issue related to go plugin crashes

This only appears to be the case on darwin (OS X).