-
Notifications
You must be signed in to change notification settings - Fork 20
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
Checkptr failure #7
Comments
Hi, I added the checkptr feature to the Go compiler. Are you still having this problem? If so, can you share the checkptr error message and stack trace that are printed? |
Hi Matthew, thanks for looking at this. Complete stack trace below:
|
Thanks. It looks like this is an issue with imgui-go. The problem isn't that you're converting a value to uintptr. It's that imgui-go's Probably imgui-go should be updated to use |
Fixed by changes described here inkyblackness/imgui-go#98 |
As of version 1.14 of Go the race detector adds
checkptr
instrumention. This compilation option ensures that program's follow Go'sunsafe.Pointer
safety rules. https://golang.org/doc/go1.14#compilerCurrently, Gopher2600 fails the
checkptr
test because of how fonts are setup forimgui-go
. To wit, the following triggers thecheckptr
error:fontTexture
has previously been generated and bound and has the value 0.imgui.TextureID
casts that value to auintptr
and thus triggers the error (pointer value too low).It is possible to turn off
checkptr
with a build flag (the Makefile includes arace
target that does this):This is useful because it has allowed
gopher2600
to be cleaned of race errors but thecheckptr
error remains.In a nutshell, I'm not sure how to fix it. As far as I can tell, the
fontTexture
value is not really a pointer but casting it touintptr
raises the suspicions of thecheckPtr
code. I also cannot see how to alterimgui-go
in such a way to avoid usinguintptr
.The text was updated successfully, but these errors were encountered: