I recently updated glibc from release 2.31 to release 2.32 on Gentoo Linux running on a 32-bit armv7 machine. Ever since that the ntpd from openntpd doesn't startup any more. Digging deeper I found that the forked 'ntp_main' instance of ntpd dies with a SIGSEGV when executing the the adjtime() glibc function call in the following function: ``` double getoffset(void) { struct timeval tv; >>>> if (adjtime(NULL, &tv) == -1) return (0.0); return (tv.tv_sec + 1.0e-6 * tv.tv_usec); } ``` The issue seems to stem from glibc git commit 0308077e3a4ff1c123cdddd311f55a2ecdd3115c where the newly introduced __adjtime 32-bit wrapper cannot handle a NULL pointer itv input parameter. ``` +#if __TIMESIZE != 64 +libc_hidden_def (__adjtime64) + +int +__adjtime (const struct timeval *itv, struct timeval *otv) +{ + struct __timeval64 itv64, otv64; + int retval; + + itv64 = valid_timeval_to_timeval64 (*itv); + retval = __adjtime64 (&itv64, otv != NULL ? &otv64 : NULL); + if (otv != NULL) + *otv = valid_timeval64_to_timeval (otv64); + + return retval; +} +#endif ```
This seems a regression of BZ#2449 from the y2038 support.
Fixed on 2.33.
Note: Order of the Resolution drop-down list changed. NOTABUG is now first.