3 ms·
checkout type Pointer in golang package "unsafe".
by johnthescott 3y ago
checkout type Pointer in golang package "unsafe".
- jjgreen 3y agoI wrote a "ball in a box" program in basic <mumble> years ago, the ball poked into a block of memory and bounced around and was drawn on the screen. I was very pleased with myself. Occasionally the ball would escape the box and proceed to travel through the address-space, eventually poking into the memory where the OS lived, locking the machine. I bet go can't do that, however "unsafe" it claims to be.
- Pesthuf 3y agoThat’s not because of Go, that’s because of protected mode and virtual memory. If run on a system that doesn’t have that, Go could absolutely read and write to system memory.