logoalt Hacker News

gpderettayesterday at 1:14 PM3 repliesview on HN

wouldn't a concurrent change without synchronization be UB anyway? Also parent wants to cache the address, not the value (but you have to cache the value if you want to optimize manually)


Replies

asa400yesterday at 8:17 PM

Not necessarily UB, but absolutely "spooky action" nondeterministic race conditions that make things difficult to understand.

skitteryesterday at 3:45 PM

Why would it be UB? All objects are behind (thin) pointers, which can be overwritten atomically.