在打开API文件时修复运行时错误?

时间:2019-05-09 21:39:50

标签: runtime-error

为了解决编码难题,该公司提供了一个可下载的API文件,名为fake_api,但是每次我尝试在终端中运行该文件时,都会引发致命错误

通过查看stackoverflow上的类似错误,我尝试重新安装cfssl以及升级brew。错误保持不变。

// ♥ chmod +x /fake_api
// ♥ ./fake_api
failed MSpanList_Insert 0xf04000 0x643dc0e609666 0x0 0x0
fatal error: MSpanList_Insert

runtime stack:
runtime.throw(0x66ee20, 0x10)
    /usr/local/go/src/runtime/panic.go:530 +0x90 fp=0x7ffeefbff040 sp=0x7ffeefbff028
runtime.(*mSpanList).insert(0x8e53e8, 0xf04000)
    /usr/local/go/src/runtime/mheap.go:933 +0x293 fp=0x7ffeefbff070 sp=0x7ffeefbff040
runtime.(*mheap).freeSpanLocked(0x8e4be0, 0xf04000, 0x100, 0x0)
    /usr/local/go/src/runtime/mheap.go:809 +0x4be fp=0x7ffeefbff0d8 sp=0x7ffeefbff070
runtime.(*mheap).grow(0x8e4be0, 0x8, 0x0)
    /usr/local/go/src/runtime/mheap.go:675 +0x2a0 fp=0x7ffeefbff130 sp=0x7ffeefbff0d8
runtime.(*mheap).allocSpanLocked(0x8e4be0, 0x1, 0x0)
    /usr/local/go/src/runtime/mheap.go:553 +0x4e3 fp=0x7ffeefbff188 sp=0x7ffeefbff130
runtime.(*mheap).alloc_m(0x8e4be0, 0x1, 0x15, 0x0)
    /usr/local/go/src/runtime/mheap.go:437 +0x119 fp=0x7ffeefbff1b8 sp=0x7ffeefbff188
runtime.(*mheap).alloc.func1()
    /usr/local/go/src/runtime/mheap.go:502 +0x41 fp=0x7ffeefbff1e8 sp=0x7ffeefbff1b8
runtime.systemstack(0x7ffeefbff208)
    /usr/local/go/src/runtime/asm_amd64.s:307 +0xab fp=0x7ffeefbff1f0 sp=0x7ffeefbff1e8
runtime.(*mheap).alloc(0x8e4be0, 0x1, 0x10000000015, 0xfa6f)
    /usr/local/go/src/runtime/mheap.go:503 +0x63 fp=0x7ffeefbff238 sp=0x7ffeefbff1f0
runtime.(*mcentral).grow(0x8e67e0, 0x0)
    /usr/local/go/src/runtime/mcentral.go:209 +0x93 fp=0x7ffeefbff2a0 sp=0x7ffeefbff238
runtime.(*mcentral).cacheSpan(0x8e67e0, 0x8df678)
    /usr/local/go/src/runtime/mcentral.go:89 +0x47d fp=0x7ffeefbff2e0 sp=0x7ffeefbff2a0
runtime.(*mcache).refill(0xf00000, 0x15, 0x7ffeefbff348)
    /usr/local/go/src/runtime/mcache.go:119 +0xcc fp=0x7ffeefbff318 sp=0x7ffeefbff2e0
runtime.mallocgc.func2()
    /usr/local/go/src/runtime/malloc.go:642 +0x2b fp=0x7ffeefbff338 sp=0x7ffeefbff318
runtime.systemstack(0x7ffeefbff3d8)
    /usr/local/go/src/runtime/asm_amd64.s:307 +0xab fp=0x7ffeefbff340 sp=0x7ffeefbff338
runtime.mallocgc(0x180, 0x600640, 0x0, 0x800000000)
    /usr/local/go/src/runtime/malloc.go:643 +0x869 fp=0x7ffeefbff418 sp=0x7ffeefbff340
runtime.newobject(0x600640, 0x8dfb10)
    /usr/local/go/src/runtime/malloc.go:781 +0x42 fp=0x7ffeefbff440 sp=0x7ffeefbff418
runtime.malg(0x8000, 0x8dfec0)
    /usr/local/go/src/runtime/proc.go:2634 +0x27 fp=0x7ffeefbff478 sp=0x7ffeefbff440
runtime.mpreinit(0x8e0460)
    /usr/local/go/src/runtime/os1_darwin.go:140 +0x1f fp=0x7ffeefbff490 sp=0x7ffeefbff478
runtime.mcommoninit(0x8e0460)
    /usr/local/go/src/runtime/proc.go:494 +0x105 fp=0x7ffeefbff4d8 sp=0x7ffeefbff490
runtime.schedinit()
    /usr/local/go/src/runtime/proc.go:434 +0x79 fp=0x7ffeefbff520 sp=0x7ffeefbff4d8
runtime.rt0_go(0x7ffeefbff550, 0x1, 0x7ffeefbff550, 0x0, 0x1, 0x7ffeefbff740, 0x0, 0x7ffeefbff74b, 0x7ffeefbff776, 0x7ffeefbff792, ...)
    /usr/local/go/src/runtime/asm_amd64.s:138 +0x132 fp=0x7ffeefbff528 sp=0x7ffeefbff520

预期结果是文件成功打开的结果,实际结果是致命错误:MSpanList_Insert

0 个答案:

没有答案