ng icon indicating copy to clipboard operation
ng copied to clipboard

eval: crash on macOS plugin load

Open crawshaw opened this issue 8 years ago • 1 comments

Looks like a bug in the Go runtime. It's happening in eval/testdata/http1.ng:

$ go test neugram.io/ng/eval
runtime: bad pointer in frame plugin.open at 0xc420be8e68: 0x3
fatal error: invalid pointer found on stack

runtime stack:
runtime.throw(0x5e8f7f9, 0x1e)
        /Users/crawshaw/go/go/src/runtime/panic.go:616 +0x81 fp=0x70000c043718 sp=0x70000c0436f8 pc=0x5a7dda1
runtime.adjustpointers(0xc420be8e08, 0x70000c043810, 0x70000c043bc0, 0x45c21b8, 0x45dbfc0)
        /Users/crawshaw/go/go/src/runtime/stack.go:592 +0x23e fp=0x70000c043788 sp=0x70000c043718 pc=0x5a93bae
runtime.adjustframe(0x70000c043ad0, 0x70000c043bc0, 0x45dbfc0)
        /Users/crawshaw/go/go/src/runtime/stack.go:663 +0x32c fp=0x70000c043840 sp=0x70000c043788 pc=0x5a93efc
runtime.gentraceback(0xffffffffffffffff, 0xffffffffffffffff, 0x0, 0xc420184180, 0x0, 0x0, 0x7fffffff, 0x5e9e328, 0x70000c043bc0, 0x0, ...)
        /Users/crawshaw/go/go/src/runtime/traceback.go:339 +0x1334 fp=0x70000c043b38 sp=0x70000c043840 pc=0x5a9d084
runtime.copystack(0xc420184180, 0x20000, 0x9180301)
        /Users/crawshaw/go/go/src/runtime/stack.go:891 +0x26e fp=0x70000c043cf0 sp=0x70000c043b38 pc=0x5a949ee
runtime.newstack()
        /Users/crawshaw/go/go/src/runtime/stack.go:1063 +0x310 fp=0x70000c043e80 sp=0x70000c043cf0 pc=0x5a94e00
runtime.morestack()
        /Users/crawshaw/go/go/src/runtime/asm_amd64.s:480 +0x89 fp=0x70000c043e88 sp=0x70000c043e80 pc=0x5aa2df9

crawshaw avatar Dec 22 '17 22:12 crawshaw

For narrowing it down, eval/testdata/import4.ng imports smaller packages and also fails.

Importantly, this bug wasn't appearing until 44c088ae5. So comparing the set of symbols imported before and after that commit in the plugin may give a clue as to how to create a simple reproduction case for upstream.

crawshaw avatar Dec 22 '17 22:12 crawshaw