Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic when run gcWriteBarrier ( Linux golang 1.11 ) #12

Closed
pkujhd opened this issue May 21, 2020 · 0 comments
Closed

panic when run gcWriteBarrier ( Linux golang 1.11 ) #12

pkujhd opened this issue May 21, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@pkujhd
Copy link
Owner

pkujhd commented May 21, 2020

package main

func main() {
        max := 1024 * 32
        VMap := make(map[int][]*int)
        for i := 0xFF; i < max; i++ {
                VMap[i] = append(VMap[i], &i)
        }
}

result:

fatal error: workbuf is not empty

runtime stack:
runtime.throw(0x7794c3, 0x14)
        /home/pkujhd/programs/go.1.11.12/src/runtime/panic.go:608 +0x72
runtime.(*workbuf).checkempty(0xc0003d1800)
        /home/pkujhd/programs/go.1.11.12/src/runtime/mgcwork.go:359 +0x4c
runtime.getempty(0xc0003d1800)
        /home/pkujhd/programs/go.1.11.12/src/runtime/mgcwork.go:371 +0x1f7
runtime.(*gcWork).putBatch(0xc000021270, 0xc0000212a0, 0x7, 0x187)
        /home/pkujhd/programs/go.1.11.12/src/runtime/mgcwork.go:172 +0x5f
runtime.wbBufFlush1(0xc000020000)
        /home/pkujhd/programs/go.1.11.12/src/runtime/mwbbuf.go:272 +0x1f7
runtime.wbBufFlush.func1()
        /home/pkujhd/programs/go.1.11.12/src/runtime/mwbbuf.go:195 +0x3a
runtime.systemstack(0x0)
        /home/pkujhd/programs/go.1.11.12/src/runtime/asm_amd64.s:351 +0x66
runtime.mstart()
        /home/pkujhd/programs/go.1.11.12/src/runtime/proc.go:1229

goroutine 1 [running]:
runtime.systemstack_switch()
        /home/pkujhd/programs/go.1.11.12/src/runtime/asm_amd64.s:311 fp=0xc00055b310 sp=0xc00055b308 pc=0x456230
runtime.wbBufFlush(0xc0003a8140, 0xc0005ae0c0)
        /home/pkujhd/programs/go.1.11.12/src/runtime/mwbbuf.go:194 +0x4e fp=0xc00055b330 sp=0xc00055b310 pc=0x427ece
runtime.gcWriteBarrier(0x6da3a0, 0x0, 0x0, 0x0, 0x1, 0xc0005ae0c0, 0x0, 0x1, 0xc0003a8140, 0xc000015c00, ...)
        /home/pkujhd/programs/go.1.11.12/src/runtime/asm_amd64.s:1420 +0xb4 fp=0xc00055b3b8 sp=0xc00055b330 pc=0x4583d4
main.main()
        /home/pkujhd/go/base.go:7 +0x176 fp=0xc00055b558 sp=0xc00055b3b8 pc=0x7f5abf5ac176
main.main()
        /home/pkujhd/go/src/github.com/pkujhd/goloader/examples/loader/loader.go:98 +0xffb fp=0xc00055bf98 sp=0xc00055b558 pc=0x6b159b
runtime.main()
        /home/pkujhd/programs/go.1.11.12/src/runtime/proc.go:201 +0x207 fp=0xc00055bfe0 sp=0xc00055bf98 pc=0x42d7a7
runtime.goexit()
        /home/pkujhd/programs/go.1.11.12/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc00055bfe8 sp=0xc00055bfe0 pc=0x458311

@pkujhd pkujhd added the bug Something isn't working label May 21, 2020
@pkujhd pkujhd closed this as completed in 7620890 May 21, 2020
pkujhd added a commit that referenced this issue May 22, 2020
pkujhd added a commit that referenced this issue May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant