top | item 7326875

(no title)

Eiwatah4 | 12 years ago

Either that, or a race condition.

discuss

order

johnbender|12 years ago

I'm not sure that's necessarily the case. See my comment above about sequential consistency.

ben0x539|12 years ago

Aren't those undefined behavior bugs?

Dylan16807|12 years ago

Imagine two threads that safely lock a resource, increment it, copy the value, and then unlock it. This is entirely defined, but also a race condition.

Race conditions are a lot like unsanitized input. They don't cause problems by themselves, but if you make incorrect assumptions it's easy to write incorrect code.

gsg|12 years ago

It's data races specifically that are undefined behaviour.