Code to circumvent Go's memory safety (read/write arbitrary addresses without unsafe)

116 views
Skip to first unread message

BUGFIX 66

unread,
Nov 25, 2022, 10:48:59 PM11/25/22
to golang-nuts
The code from Russ Cox's article (https://research.swtch.com/gorace) no longer works with the modern Go compiler, because the compiler does a better job of removing redundant operations.

But here is minimal (?) working code to read/write bytes at arbitrary addresses without importing unsafe:


With today's Go runtime, if GOMAXPROCS equals 1, does that prevent this circumvention?
Reply all
Reply to author
Forward
0 new messages