dongwen7187 2017-11-24 21:43
浏览 87
已采纳

在macOS Sierra上以调试方式运行的GoLang失败

After updating to macOS Sierra all my goland "run debug" commands started failing with the following message:

GOROOT=/usr/local/Cellar/go/1.8.3/libexec #gosetup
GOPATH=/Users/myuser/Go #gosetup
/usr/local/Cellar/go/1.8.3/libexec/bin/go build -o /private/var/folders/yf/vx268prd0cqbvvprg6q7qzjh0000gp/T/___Go_run -gcflags "-N -l" -a /Users/myuser/Go/src/github.com/mycompany/myproject/app/main.go #gosetup
# command-line-arguments
runtime.(*mspan).base: nosplit stack overflow
    744 assumed on entry to runtime.cgoCheckMemmove (nosplit)
    696 after runtime.cgoCheckMemmove (nosplit) uses 48
    688 on entry to runtime.cgoCheckTypedBlock (nosplit)
    376 after runtime.cgoCheckTypedBlock (nosplit) uses 312
    368 on entry to runtime.cgoCheckBits (nosplit)
    224 after runtime.cgoCheckBits (nosplit) uses 144
    216 on entry to runtime.cgoIsGoPointer (nosplit)
    64  after runtime.cgoIsGoPointer (nosplit) uses 152
    56  on entry to runtime.inHeapOrStack (nosplit)
    0   after runtime.inHeapOrStack (nosplit) uses 56
    -8  on entry to runtime.(*mspan).base
runtime.inHeapOrStack: nosplit stack overflow
    744 assumed on entry to runtime.cgoCheckSliceCopy (nosplit)
    672 after runtime.cgoCheckSliceCopy (nosplit) uses 72
    664 on entry to runtime.cgoCheckTypedBlock (nosplit)
    352 after runtime.cgoCheckTypedBlock (nosplit) uses 312
    344 on entry to runtime.cgoCheckBits (nosplit)
    200 after runtime.cgoCheckBits (nosplit) uses 144
    192 on entry to runtime.cgoIsGoPointer (nosplit)
    40  after runtime.cgoIsGoPointer (nosplit) uses 152
    32  on entry to runtime.inHeapOrStack (nosplit)
    -24 after runtime.inHeapOrStack (nosplit) uses 56
runtime.inHeapOrStack: nosplit stack overflow
    744 assumed on entry to runtime.typedmemmove (nosplit)
    696 after runtime.typedmemmove (nosplit) uses 48
    688 on entry to runtime.cgoCheckMemmove (nosplit)
    640 after runtime.cgoCheckMemmove (nosplit) uses 48
    632 on entry to runtime.cgoCheckTypedBlock (nosplit)
    320 after runtime.cgoCheckTypedBlock (nosplit) uses 312
    312 on entry to runtime.cgoCheckBits (nosplit)
    168 after runtime.cgoCheckBits (nosplit) uses 144
    160 on entry to runtime.cgoIsGoPointer (nosplit)
    8   after runtime.cgoIsGoPointer (nosplit) uses 152
    0   on entry to runtime.inHeapOrStack (nosplit)
    -56 after runtime.inHeapOrStack (nosplit) uses 56
runtime.cgoIsGoPointer: nosplit stack overflow
    744 assumed on entry to runtime.typedslicecopy (nosplit)
    600 after runtime.typedslicecopy (nosplit) uses 144
    592 on entry to runtime.cgoCheckSliceCopy (nosplit)
    520 after runtime.cgoCheckSliceCopy (nosplit) uses 72
    512 on entry to runtime.cgoCheckTypedBlock (nosplit)
    200 after runtime.cgoCheckTypedBlock (nosplit) uses 312
    192 on entry to runtime.cgoCheckBits (nosplit)
    48  after runtime.cgoCheckBits (nosplit) uses 144
    40  on entry to runtime.cgoIsGoPointer (nosplit)
    -112    after runtime.cgoIsGoPointer (nosplit) uses 152
runtime.dopanic: nosplit stack overflow
    744 assumed on entry to runtime.freedefer (nosplit)
    528 after runtime.freedefer (nosplit) uses 216
    520 on entry to runtime.typedmemmove (nosplit)
    472 after runtime.typedmemmove (nosplit) uses 48
    464 on entry to runtime.bulkBarrierPreWrite (nosplit)
    104 after runtime.bulkBarrierPreWrite (nosplit) uses 360
    96  on entry to runtime.throw (nosplit)
    64  after runtime.throw (nosplit) uses 32
    56  on entry to runtime.dopanic (nosplit)
    -32 after runtime.dopanic (nosplit) uses 88
runtime.bulkBarrierPreWrite: nosplit stack overflow
    744 assumed on entry to runtime.deferreturn (nosplit)
    640 after runtime.deferreturn (nosplit) uses 104
    632 on entry to runtime.freedefer (nosplit)
    416 after runtime.freedefer (nosplit) uses 216
    408 on entry to runtime.typedmemmove (nosplit)
    360 after runtime.typedmemmove (nosplit) uses 48
    352 on entry to runtime.bulkBarrierPreWrite (nosplit)
    -8  after runtime.bulkBarrierPreWrite (nosplit) uses 360
runtime.(*cpuProfile).evict: nosplit stack overflow
    744 assumed on entry to runtime.sigprofNonGoPC (nosplit)
    632 after runtime.sigprofNonGoPC (nosplit) uses 112
    624 on entry to runtime.(*cpuProfile).addNonGo (nosplit)
    576 after runtime.(*cpuProfile).addNonGo (nosplit) uses 48
    568 on entry to runtime.(*cpuProfile).addWithFlushlog (nosplit)
    200 after runtime.(*cpuProfile).addWithFlushlog (nosplit) uses 368
    192 on entry to runtime.(*cpuProfile).evict (nosplit)
    -16 after runtime.(*cpuProfile).evict (nosplit) uses 208
runtime.(*cpuProfile).addWithFlushlog: nosplit stack overflow
    744 assumed on entry to runtime.sigtrampgo (nosplit)
    488 after runtime.sigtrampgo (nosplit) uses 256
    480 on entry to runtime.sigprofNonGoPC (nosplit)
    368 after runtime.sigprofNonGoPC (nosplit) uses 112
    360 on entry to runtime.(*cpuProfile).addNonGo (nosplit)
    312 after runtime.(*cpuProfile).addNonGo (nosplit) uses 48
    304 on entry to runtime.(*cpuProfile).addWithFlushlog (nosplit)
    -64 after runtime.(*cpuProfile).addWithFlushlog (nosplit) uses 368

Just running the application works fine, but debug always fails on compilation step. I tried building with the flags like that and it worked, so I can't really understand why this is happening. Anyone has a lead?

  • 写回答

1条回答 默认 最新

  • duanji4449 2017-11-24 21:55
    关注

    This was addressed in this issue and it's Go issue.

    The solution is to upgrade to Go 1.9.2 or later.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私