Pre-release review of glibc 2.17: 0 P1 bugs, 14 P2 bugs, 0 P3 bugs.
David Miller
davem@davemloft.net
Mon Dec 3 22:11:00 GMT 2012
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
More information about the Libc-alpha
mailing list