[PATCH] __libc_lock_define_initialized: Always initialize the lock
Adhemerval Zanella
adhemerval.zanella@linaro.org
Wed Nov 25 18:43:00 GMT 2015
On 24-11-2015 19:44, Florian Weimer wrote:
> Since GCC 4.0, GCC will put zero-initialized variables into .bss.
> This makes the macro suitable for automatic variables, too.
>
> On x86_64-redhat-linux-gnu, all DSOs except libc.so.6 are unchanged.
> The differences for libc.so.6 are harmless, the symbols still end up in
> .bss:
>
> <https://gcc.gnu.org/ml/gcc-help/2015-11/msg00211.html>
>
> I think this change is still worthwhile because it removes a nasty
> source of errors, a macro with âinitializedâ in the name which does not
> actually initialize anything.
>
> Florian
>
LGTM. Since you touching this, I think it is worthwhile to cleanup the
LLL_LOCK_INITIALIZER{_LOCKED,_WAITERS} definition (i386, sparc, and
x86_64 redefines it to same value).
More information about the Libc-alpha
mailing list