This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] __libc_lock_define_initialized: Always initialize the lock



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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]