This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv3] Protect _dl_profile_fixup data-dependency order [BZ #23690]
* Carlos O'Donell:
> The use of the guard+fence-to-fence sync is, from a C11 perspective,
> correct.
I really don't think this is true:
| Two expression evaluations conflict if one of them modifies a memory
| location and the other one reads or modifies the same memory location.
(C11 5.1.2.4p4)
| The execution of a program contains a data race if it contains two
| conflicting actions in different threads, at least one of which is not
| atomic, and neither happens before the other. Any such data race
| results in undefined behavior.
(C11 51.2.4p25)
We still have unordered conflicting non-atomic writes after Tulio's
patch. I don't think they matter to us. But this is *not* correct for
C11.
Thanks,
Florian