On 09/28/2018 03:43 PM, Ian Lance Taylor wrote:
> That statement is not subject to change.  Note that that statement
> does not say that if p1 and p2 are pointer values, and that p1 == p2,
> that uintptr(unsafe.Pointer(p1)) == uintptr(unsafe.Pointer(p2)).  You
> must not take intuitions from computer hardware into a managed memory
> language like Go.  The rules about the safe use of pointers converted
> to uintptr are written down at https://golang.org/pkg/unsafe/#Pointer
> .  Doing anything not explicitly permitted there is unsafe, where
> unsafe means that your program may suffer from arbitrary memory
> corruption and may crash at any time.


Ah yes... I'm not allowed to convert the uintptr back into a pointer.

Thanks.

/Peter

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to