Looks some GO compiler bug. Please see below for more details to validate and confirm about bug.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

21 rinda
565B

  1. #!/bin/bash
  2. unset GOPATH
  3. #run plugin directly to see correct result
  4. go run plugin/plugin.go
  5. #compile as plugin
  6. go build -buildmode=plugin -o /tmp/plugin.so ../compiler_bug/plugin/
  7. #running plugin will trigger error
  8. go run runplugin/main.go
  9. #However, if the plugin is compiled with generic tag (To disable asm code, the bug doesn't occur), Some register corruption occurs due to wrong code being generated.
  10. #go build -buildmode=plugin -tags generic -o /tmp/plugin.so ../compiler_bug/plugin/
  11. #running plugin will not cause an error
  12. #go run runplugin/main.go