goloader icon indicating copy to clipboard operation
goloader copied to clipboard

Errors on Go 1.11

Open capnspacehook opened this issue 5 years ago • 12 comments

As you probably saw in the Travis builds, something isn't quite right when using Goloader with Go 1.11. Here is the output of running the 'base' example with the example loader:


unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

unknown gcobj: 

Load error: offset overflow sym: runtime.writeBarrier 

{1 2}

{1 2} &{1 2} {1 0} {0 0}

main.Vertex{X:1, Y:2} &main.Vertex{X:1, Y:2} main.Vertex{X:1, Y:0} main.Vertex{X:0, Y:0}

print &{1 2}

[John Paul George Ringo]

[{2 true} {3 false}]

map[Bell Labs:{40 -74} Google:{37 -122}]

Don't know type string

I'm a bool

runtime stack:

runtime.Stack.func1()

	/home/travis/.gimme/versions/go1.11.2.linux.amd64/src/runtime/mprof.go:798 +0xdd

goroutine 1 [running]:

runtime.systemstack_switch()

	/home/travis/.gimme/versions/go1.11.2.linux.amd64/src/runtime/asm_amd64.s:311 fp=0xc000381528 sp=0xc000381520 pc=0x4560e0

runtime.Stack(0xc0000e8400, 0x400, 0x400, 0xc0000e8400, 0x400)

	/home/travis/.gimme/versions/go1.11.2.linux.amd64/src/runtime/mprof.go:790 +0xec fp=0xc000381598 sp=0xc000381528 pc=0x42746c

<autogenerated>(...)

	/home/travis/gopath/src/github.com/dearplain/goloader/examples/base/base.go:115

fatal error: index out of range

panic during panic

runtime stack:

runtime.Stack.func1()

	/home/travis/.gimme/versions/go1.11.2.linux.amd64/src/runtime/mprof.go:798 +0xdd

I'm posting the log from the Travis build because I'm on mobile atm, but I have tried it on my own box with Go 1.11 on Windows and gotten exactly the same result.

capnspacehook avatar Jan 07 '19 05:01 capnspacehook

I'm really curious as to why goloader breaks in Go 1.11, as the moduledata struct shouldn't have been modified...

capnspacehook avatar Jan 13 '19 06:01 capnspacehook

@dearplain do you have any plans on updating this package?

dobegor avatar May 16 '19 14:05 dobegor

@dobegor No. Unfortunately, I don't have time to maintain this project.

dearplain avatar May 19 '19 08:05 dearplain

It is probably related to the change: https://github.com/golang/go/commit/9f95c9db23d9e137bc30c206b67b58cc325a8c7e#diff-13e58c7b55d786f6adf3ea94bad47ccd

typeless avatar May 22 '19 08:05 typeless

@capnspacehook I try to fix the error, push a commit https://github.com/pkujhd/goloader/commit/6a48a780e1c095a23ae8ea1549fcd10c3d9280b7, but only test on Linux

pkujhd avatar Jul 31 '19 10:07 pkujhd

有没有高手继续修正支持1.13的?

hepking avatar Sep 29 '19 05:09 hepking

可以用go自带的plugin模式替代吗

Jakegogo avatar Oct 03 '19 12:10 Jakegogo

可以用go自带的plugin模式替代吗

可以,但是自带的plugin无法unload,如果加载很多不同的.so的话,会导致内存增加过多

pkujhd avatar Oct 08 '19 01:10 pkujhd

有没有高手继续修正支持1.13的?

i already fix bugs on golang1.13, always only test on Linux. you can checout it https://github.com/pkujhd/goloader

pkujhd avatar Oct 08 '19 08:10 pkujhd

有没有高手继续修正支持1.13的?

i already fix bugs on golang1.13, always only test on Linux. you can checout it https://github.com/pkujhd/goloader

thanks very much! 高手啊

hepking avatar Dec 27 '19 02:12 hepking

有没有高手继续修正支持1.13的?

i already fix bugs on golang1.13, always only test on Linux. you can checout it https://github.com/pkujhd/goloader

@dearplain Would you consider archiving this repository and redirecting to https://github.com/pkujhd/goloader, who seems to have taken over maintenance of this project?

I nearly overlooked the fact that this up-to-date fork exists!

@pkujhd Thanks for doing this. 🙂

lthibault avatar Apr 07 '20 17:04 lthibault

有没有高手继续修正支持1.13的?

i already fix bugs on golang1.13, always only test on Linux. you can checout it https://github.com/pkujhd/goloader

@dearplain Would you consider archiving this repository and redirecting to https://github.com/pkujhd/goloader, who seems to have taken over maintenance of this project?

I nearly overlooked the fact that this up-to-date fork exists!

@pkujhd Thanks for doing this. 🙂

@lthibault With pleasure I have fixed some bugs on golang 1.11, and release tag 0.0.3, you should update it

pkujhd avatar May 26 '20 03:05 pkujhd