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: Update on freeze status of glibc 2.18?


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~


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