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
The number of * in that one is 250. Moving forward, this program is named P250. P250 runs fine, both in the playground and on my local machine. For all x >= 0 && x <= 250, the respective program Px appears to work fine.
I will note that this bug most certainly did not show up in a real program, and is merely the result of the #darkarts channel on the Gophers Slack poking at the reflect package.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I ran the following program: https://play.golang.org/p/Oawu1xbQTSN
The number of
*
in that one is 250. Moving forward, this program is named P250. P250 runs fine, both in the playground and on my local machine. For allx >= 0 && x <= 250
, the respective programPx
appears to work fine.P251
This is P251: https://play.golang.org/p/mm0AO0I8F4M. It is P250, but with an added
*
.In the playground, P251 appears to be an infinite loop: https://play.golang.org/p/-P4HziKyv9W
On my local machine, however, I get the following from P251, which is perhaps more enlightening:
Note the bogus addresses in the
fmt.(*pp).fmtString
frame:0x63202c6f6c6c6568
isc ,olleh
0x772074707572726f
isw tpurro
P252
P252 is also an infinite loop in the playground, but crashes on my local machine like so:
P253 and onwards
These seem to be infinite loops wherever I run them.
What did you expect to see?
I expected P251 and onwards to work just as P250 did.
What did you see instead?
P251 and subsequent programs appear to corrupt memory, loop infinitely, or crash in mysterious ways.
The text was updated successfully, but these errors were encountered: