Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
x/mobile: go rand crash #21112
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
@bradfitz crashes in Go native code not captured by the system. So, it does only my device.
My project is:
Device Nexus 9, arm
It is hard to debug, but I can add some debug prints and say which numbers are causing the crash. But seems like 'j' out of index, only possible when 'r.Intn(i) <= i' and it should not crash when it is 0 or -1.
I do not know what to do, but just ignore Perm() calls at all in my app...
Nexus 9 uses https://en.wikipedia.org/wiki/Project_Denver and has known problems with certain instruction sequences. Go's compiler generates instruction sequences different from what Nexus 9 was tested with, so we apparently confuse the Project Denver JIT.
See similar bug #19809 and all the bugs referenced from it in other non-Go projects.
Nexus 9 just has a buggy CPU. It only works for Android because that's what was tested on it.
Please try Go 1.9. Go 1.8 didn't include the 9d5987d Nexus 9 workaround. So you might be better off with that. Or maybe not.
In any case, there's little we can do here.