Looks some GO compiler bug. Please see below for more details to validate and confirm about bug.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

21 Zeilen
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