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

cmd/cgo: panic in enum #11097

9yx opened this issue Jun 6, 2015 · 1 comment


Copy link

commented Jun 6, 2015

Build code, error similar #3368

package main

import "C" 

func main() {
    var a = C.enum_test(1)


# test
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x40ec96]

goroutine 1 [running]:
main.(*Package).rewriteRef(0xc20808e2a0, 0xc2080a0000)
        /opt/go.1.5/src/cmd/cgo/gcc.go:610 +0x1466
main.(*Package).Translate(0xc20808e2a0, 0xc2080a0000)
        /opt/go.1.5/src/cmd/cgo/gcc.go:170 +0x197
        /opt/go.1.5/src/cmd/cgo/main.go:269 +0x1059

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Jul 11, 2015


This comment has been minimized.

Copy link

commented Oct 3, 2015

CL mentions this issue.

@golang golang locked and limited conversation to collaborators Oct 4, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
3 participants
You can’t perform that action at this time.