Get the latest tech news

Crash the GC with Random Values in Unsafe.Pointers


Mmmm, pointy

I’ve also used memory allocated directly via syscalls with Go for many years without (fingers crossed) any issues. I think it’s panicing because if it finds a pointer to a piece of memory that it has freed, then it has perhaps not done its job properly. The panic is there primarily to detect and help diagnose GC bugs, and just happens to catch poor uses of unsafe.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Random Values

Random Values

Photo of Pointers

Pointers