This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] __libc_lock_define_initialized: Always initialize the lock
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Wed, 25 Nov 2015 16:43:30 -0200
- Subject: Re: [PATCH] __libc_lock_define_initialized: Always initialize the lock
- Authentication-results: sourceware.org; auth=none
- References: <5654DA50 dot 5060002 at redhat dot com>
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).