Skip to content
This repository has been archived by the owner on Mar 4, 2018. It is now read-only.

panic: runtime error: cgo argument has Go pointer to Go pointer #40

Open
zhengxiaochuan-3 opened this issue Aug 15, 2017 · 2 comments
Open

Comments

@zhengxiaochuan-3
Copy link

[root@localhost gomdb]# go version
go version go1.8 linux/amd64

[root@localhost gomdb]# go test -bench .
--- FAIL: TestTest1 (0.00s)
panic: runtime error: cgo argument has Go pointer to Go pointer [recovered]
	panic: runtime error: cgo argument has Go pointer to Go pointer

goroutine 23 [running, locked to thread]:
testing.tRunner.func1(0xc4200789c0)
	/usr/local/go/src/testing/testing.go:622 +0x29d
panic(0x543e00, 0xc420070f80)
	/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/szferi/gomdb.(*Txn).Put.func1(0x217ce960, 0xc400000001, 0xc420070f60, 0xc420070f70, 0xc400000010, 0x5)
	/home/go-project/src/github.com/szferi/gomdb/txn.go:149 +0x8b
github.com/szferi/gomdb.(*Txn).Put(0xc4200820d8, 0x1, 0xc420070f50, 0x5, 0x8, 0xc420070f58, 0x5, 0x8, 0x10, 0x0, ...)
	/home/go-project/src/github.com/szferi/gomdb/txn.go:149 +0xf7
github.com/szferi/gomdb.TestTest1(0xc4200789c0)
	/home/go-project/src/github.com/szferi/gomdb/mdb_test.go:52 +0x7ec
testing.tRunner(0xc4200789c0, 0x572d90)
	/usr/local/go/src/testing/testing.go:657 +0x96
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:697 +0x2ca
exit status 2
FAIL	github.com/szferi/gomdb	0.006s
@itsmontoya
Copy link

IIRC go 1.8 checks for this issue while prior versions did not. I don't think this library will work until he fixes it. Unfortunately, this repo seems a little quiet :(

@stapelberg
Copy link

I think the approach which bmatsuo/lmdb-go@ee54e27#diff-0883e46e594b4d9e50c72005c5d390d9 implements (in a separate repo/project) is what needs to be done here as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants