-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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 on type with bit fields #5242
Labels
Comments
@minux - what do you think the correct behavior is in this situation ? Should cgo reject the program outright, or should we attempt to do our best in the hope if the struct is not referenced directly in Go ? https://golang.org/cl/10300043 is a possible solution for the former. Labels changed: added go1.2maybe. |
i think we should reject a cgo program if it involves translating a C structure with bitfields in it to a Go type. but, what if the structure uses bitfields for alignment (e.g. only use bitfields whose width is multiple of 8)? i know some FreeBSD structures uses this trick which makes gccgo fails to build (because gccgo also needs to translate C struct to Go struct, and it refuses to do so if there is any bitfields in the struct) |
CL https://golang.org/cl/125120043 mentions this issue. |
This issue was closed by revision 31a996e. Status changed to Fixed. |
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 25, 2018
Fixes golang#5242. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/125120043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 9, 2018
Fixes golang#5242. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/125120043
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: