This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Pre-release review of glibc 2.17: 0 P1 bugs, 14 P2 bugs, 0 P3bugs.
- From: David Miller <davem at davemloft dot net>
- To: carlos at systemhalted dot org
- Cc: libc-alpha at sourceware dot org, fweimer at redhat dot com, roland at hack dot frob dot com,hjl dot tools at gmail dot com, law at redhat dot com
- Date: Mon, 03 Dec 2012 17:11:34 -0500 (EST)
- Subject: Re: Pre-release review of glibc 2.17: 0 P1 bugs, 14 P2 bugs, 0 P3bugs.
- References: <CAE2sS1jurTyTF8XwmKLLQWTo60c+w7FbJyZ=4nT+DUN111XD1A@mail.gmail.com><20121129.115006.1040521441058813625.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Thu, 29 Nov 2012 11:50:06 -0500 (EST)
> From: "Carlos O'Donell" <carlos@systemhalted.org>
> Date: Thu, 29 Nov 2012 10:49:59 -0500
>
>> "fprintf() function is multithread-unsafe"
>> http://sourceware.org/bugzilla/show_bug.cgi?id=14267
>> - Not enough review to go into 2.17.
>> - This is an honest to goodness real problem, but we need more serious review.
>
> I think the patch could be resonably verified and the change installed,
> it's not that overly complicated in my opinion.
I spent some time thinking about this fix.
I don't like it at all, as it penalizes (performance wise) people who
do not use the features that cause the problem.
Any fix for this should do something like:
local_var = NULL;
if (__printf_function_table)
{
lock();
local_var = __printf_function_table;
if (!local_var)
unlock();
}
...
if (local_var)
unlock();
This way the locks are only taken if the feature is used, rather
than unconditionally.
In any event, this means deferring this bug to glibc-2.18