This is a post inspired by a question on the Go Forum. The question, paraphrased, was “If properly aligned writes are guaranteed to be atomic by the processor, why does the race detector complain?” The answer is, there are two uses of the word atomic in play here. The first, the one the OP references, […]
#data race
3 posts
6 Jan 2018
7 Dec 2015
Panic messages from unexpected program crashes are often reported on the Go issue tracker. An overwhelming number of these panics are caused by data races, and an overwhelming number of those reports centre around Go’s built in map type. unexpected fault address 0x0 fatal error: fault [signal 0x7 code=0x80 addr=0x0 pc=0x40873b] goroutine 97699 [running]: runtime.throw(0x17f5cc0, 0x5) […]
27 Jun 2014
This is a post about data races. The code for this post lives on Github, github.com/davecheney/benandjerry. The example program simulates two Ice cream makers, Ben and Jerry, who greet their customers randomly. package main import "fmt" type IceCreamMaker interface { // Hello greets a customer Hello() } type Ben struct { name string } func (b *Ben) […]