You are right. There was even a discussion about how broken it wasin 2008, and it was fixed, at least in practice.Theoretically (and not unlikely also in practice), it seems to be still broken.This can also confirmed by compiling with -fsanitize=thread: