runtime/cgo: "bad pointer in frame" caused by non-pointer Android EGLDisplay #27054
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?go version devel +5a720d229d Sat Aug 4 16:37:47 2018 +0000 linux/amd64
What operating system and processor architecture are you using (
go env
)?android/arm64
What did you do?
What did you expect to see?
No crash.
What did you see instead?
It seems that on Android, an EGLDIsplay is declared as a pointer ("typedef void *EGLDisplay;"), but can contain values. If I replace "fmt.Println" with "println" (that presumably doesn't trigger stack growth) I get
Which is the value (0x1) the bad pointer crash complained about.
To fix this we might need to treat EGL* types uintptr, the same as JNI jobject and Objective-C CFTypeRef. Perhaps it's an aspect of #22906.
Some thoughts:
@randall77 @ianlancetaylor
The text was updated successfully, but these errors were encountered: