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]

Y2038 and C++ ABIs


Albert, I reviewed the draft at
<https://sourceware.org/glibc/wiki/Y2038ProofnessDesign> and I see a
potential problem with the proposed type changes.

Suppose a C++ library has some function parameters whose types are
based on struct timespec or struct timeval.  Those structure names will
be mangled into the function symbol names.

If the library is rebuilt on a 32-bit architecture with the updated
glibc, and it opts in to 64-bit time support, the symbol names change -
and that's good because the function's ABI really is changing.

However, if it's rebuilt and continues to use 32-bit time, it looks
like the symbol names might still change because struct timespec would
be an alias for struct timespec32.  That would be very undesirable. 
However, I'm not sure how you intended the type aliasing to be done. 
Would struct timespec be a structure with identical layout to
timespec32/64 (which avoids this problem), or aliased through a #define
or some other means?

Ben.

-- 
Ben Hutchings
Software Developer, Codethink Ltd.


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