Currently, unsynchronized writes atomic operations on the same address are undefined behavior if at least one of them is a write. This is generally sensible, as the resulting data would not necessarily be what the write operations tried to write. However, this only matters if one of the operations was a read or if the memory location needs to contain initialized memory (e.g. because it will be read from later or because it contains an object of a type that is not MaybeUninit).
Would it be feasible & sensible to change Rust's memory model so that these specific data races – unsynchronized writes without reads – merely uninitialize the memory location?
Sadly the first sentence in your post does not parse, but I think you are asking about write-write races of regular non-atomic accesses.
This is a very good question! I don't know the answer. Some comments:
LLVM actually claims that in their memory model, write-write races are not UB but cause the memory contents to be de-initialized. However, whether that model makes any sense has to my knowledge not been studied.
There is, AFAIK, very little motivation for make such code well-defined. Do you have a good example?
Figuring out whether a memory model makes sense is very, very hard. See this paper for an example: you have to be sure that your model can be compiled to several very different hardware architectures in the expected way, and you have to be sure that all sorts of interesting non-trivial optimizations are allowed on your model. It is very easy to accidentally break one of these many constraints with a completely innocent-looking change (and your proposed change is far from innocent-looking ). Given that we have a memory model that has been analyzed to this kind of rigor, I think any replacement memory model needs to pass this same bar.