szabba/go-v8 — Issue #1: Example panics
Author: szabba
Created: 2011-12-10 22:11:22+00:00
State: open

After making both the shared C library and the go's binging build I've encountered problems with the example - it compiled without complaining, and after I put the shared library in a proper directory it ran... Only to crash.

```bash
[karol@szabbook go-v8]$ example/example
3
panic: runtime error: invalid memory address or nil pointer dereference

[signal 0xb code=0x1 addr=0x0 pc=0xf84001b8d9]

runtime.panic+0xac /build/src/release-build/src/pkg/runtime/proc.c:1254
runtime.panic(0x49aa98, 0xf8400024f0)
runtime.panicstring+0xa3 /build/src/release-build/src/pkg/runtime/runtime.c:125
runtime.panicstring(0x520acb, 0x7fff8122dfe0)
runtime.sigpanic+0x144 /build/src/release-build/src/pkg/runtime/linux/thread.c:307
runtime.sigpanic()

goroutine 1 [3]:
return /build/src/release-build/src/pkg/runtime/amd64/asm.s:424
return()
runtime.cgocall+0x110 /build/src/release-build/src/pkg/runtime/cgocall.c:135
runtime.cgocall(0x42172d, 0x7f1106d09ee8, 0x8, 0x420e32)
github%2ecom/mattn/go-v8/v8._Cfunc_v8_execute+0x2f /home/karol/Code/go-v8/_obj/_cgo_defun.c:42
github%2ecom/mattn/go-v8/v8._Cfunc_v8_execute(0x3188b20, 0x31a26a0)
github%2ecom/mattn/go-v8/v8.(*V8Context).Eval+0xaf /home/karol/Code/go-v8/_obj/v8.cgo1.go:-50
github%2ecom/mattn/go-v8/v8.(*V8Context).Eval(0xf84002fca0, 0x4c6a3c, 0x736e6f6300000032, 0x4008000000000000, 0x4008000000000000, ...)
main.main+0xfc /home/karol/Code/go-v8/example/example.go:30
main.main()
runtime.mainstart+0xf /build/src/release-build/src/pkg/runtime/amd64/asm.s:78
runtime.mainstart()
runtime.goexit /build/src/release-build/src/pkg/runtime/proc.c:246
runtime.goexit()
----- goroutine created by -----
_rt0_amd64+0xc9 /build/src/release-build/src/pkg/runtime/amd64/asm.s:65
```

Will need to take a closer look at it.