You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some special prefixes documented at https://golang.org/cmd/cgo , so this isn't going to work as you hope. But obviously cgo should not crash.
ianlancetaylor
changed the title
cgo segfaults when resolving C.enum_* functions
cmd/cgo: segfaults when resolving C.enum_* functions
Aug 16, 2015
cgo panics in Package.rewriteRef for:
var a = C.enum_test(1)
or
p := new(C.enum_test)
when the corresponding enum type is not defined.
Check nil values for Type fields and issue a proper
error instead.
Fixes#11097
Updates #12160
Change-Id: I5821d29097ef0a36076ec5273125b09846c7d832
Reviewed-on: https://go-review.googlesource.com/15264
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Why did CL 15264 only update this issue? It seems fixed. I don't think we should try to distinguish alternate meanings for the special syntaxes like C.enum_x.
main.go
go build main.go
The text was updated successfully, but these errors were encountered: