data race
Two threads touching the same memory at the same time, at least one of them writing, with nothing to order them. In C++ that is undefined behaviour.
In C++ a data race is two conflicting accesses (same location, at least one a write) from different threads, not both atomic, with neither happening before the other; a program containing one has undefined behaviour.
Examples
Two threads each running
count++1,000 times on a plainintcan end with less than 2,000.
See also