[PATCH] elf: Use C11 like atomics on _dl_mcount

Wilco Dijkstra Wilco.Dijkstra@arm.com
Thu Sep 1 23:18:52 GMT 2022


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.

Cheers,
Wilco


More information about the Libc-alpha mailing list