[go-nuts] Curious about this snippet in /src/runtime/proc.go

2017-06-15 Thread goodwin . lawlor
Hey, Learning golang at the moment and came across this at the end of func main() in proc.go in the golang source tree. exit(0) for { var x *int32 *x = 0 } Ln 198 - 202 https://golang.org/src/runtime/proc.go How is the for loop ever reached and what's the purpose of the infinite loop, zeroing

Re: [go-nuts] Curious about this snippet in /src/runtime/proc.go

2017-06-15 Thread Goodwin Lawlor
Thanks for the explanation. My random guess was that it's the compiler version of deleting your browser cache... If exit fails, blank as much memory as we can get our hands on. 😁 On 15 Jun 2017 6:34 pm, "Ian Lance Taylor" wrote: > On Thu, Jun 15, 2017 at 10:28 AM, Tyler Compton wrote: > > Why