[PATCH] elf: Use C11 like atomics on _dl_mcount
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Fri Sep 2 12:21:09 GMT 2022
On 01/09/22 20:18, Wilco Dijkstra wrote:
> Hi Adhemerval,
>
>> Is the https://patchwork.sourceware.org/project/glibc/list/?series=10727 right? I
>> think it has failed CI, could you submit again?
>
> I'll rebase it. I'll probably move the files that cause all the conflicts into a different
> patch (an alternative would be to increase the vertical spacing between all the
> defines first so that merge tools no longer get confused).
>
>> I thinking we are tracking two different issues, although they are correlated.
>> My take is to first try to map the current code to a C11-like atomic, so we
>> can always use compiler builtins where applicable (there are couple of
>> architecture that we might avoid using libgcc for performance reasons), and
>> then check if the atomic usage does make sense.
>
> Yes, so I first mapped them to an atomic with the most appropriate MO (since
> the MO of many existing macros is not well defined). We should look at
> correctness in a second pass since it is already clear there are many concurrency
> bugs.
And it seems that for 10727 series you didn't change the elf/dl-profile.c. With
the relaxed MO for the counters, are you ok with the change?
More information about the Libc-alpha
mailing list