This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Update on freeze status of glibc 2.18?
- From: Richard Henderson <rth at twiddle dot net>
- To: Torvald Riegel <triegel at redhat dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, Carlos O'Donell <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, Ryan Arnold <rsa at us dot ibm dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Siddhesh Poyarekar <siddhesh at redhat dot com>, andi <andi at firstfloor dot org>
- Date: Fri, 21 Jun 2013 10:17:10 -0700
- Subject: Re: Update on freeze status of glibc 2.18?
- References: <51B65DE4 dot 4010107 at redhat dot com> <20130610231903 dot D9C602C09B at topped-with-meat dot com> <51B66222 dot 1040300 at redhat dot com> <20130614224427 dot 4B2532C077 at topped-with-meat dot com> <51BF3CF8 dot 1010901 at redhat dot com> <1371494971 dot 16968 dot 21574 dot camel at triegel dot csb> <20130617193649 dot 7B5872C08D at topped-with-meat dot com> <1371503900 dot 16968 dot 21902 dot camel at triegel dot csb> <20130619224234 dot 5AC132C10E at topped-with-meat dot com> <1371733830 dot 964 dot 1089 dot camel at triegel dot csb> <20130620230930 dot 6F21E2C135 at topped-with-meat dot com> <1371775236 dot 964 dot 3432 dot camel at triegel dot csb>
On 06/20/2013 05:40 PM, Torvald Riegel wrote:
> What I don't understand in your plan is how we deal with the case that
> we have a PTHREAD_MUTEX_INITIALIZER in a program built against new glibc
> headers, but executed with an older glibc version. In this case, the
> new type values coming from the initializer wouldn't be understood by
> the old pthread_mutex_lock(), for example.
We should detect this case by versioning the pthread_mutex_lock function.
We wouldn't actually need a different implementation, just a symbol version
bump so that the recompiled binary is tied to the new glibc version, and so
get an error from ld.so during startup if the versions aren't satisfied.
(One presumes that if one has a mutex initializer that at some point we'll
use the mutex. There are indirect methods of using mutexes that could avoid
this check -- new code defining a mutex to be used by old code -- but I would
think that we'll catch the 99% with the symbol version.)
r~