mirror of
https://github.com/ish-app/ish.git
synced 2026-01-25 14:06:40 +00:00
This went unnoticed for a long time because it only happens when the cmpxchg loop runs multiple times. xadd is the only arithmetic operation that changes the value of its source operand. This meant that if the cmpxchg failed, the operation would be redone with the changed source operand value instead of the original, giving the wrong result.