GNU C Library version 2.30 releases with POSIX-proposed functions, support for Unicode 12.1.0, new Linux functions and more!

2 min read

Last week, the GNU C Library version 2.30 was made available to all users. The major highlights of this release include new POSIX (Portable Operating System Interface)-proposed functions, support for Unicode 12.1.0, support to –preload argument to preload shared objects, addition of new functions such as getdents64, gettid, and tgkill to Linux and more.

The GNU C Library is used in the GNU systems, GNU/Linux systems as well as on other systems that use Linux as the kernel. It is a portable and high performance C library.

Major new features in GNU C Library version 2.30

  • New POSIX-proposed pthread_cond_clockwait, pthread_mutex_clocklock, pthread_rwlock_clockrdlock, pthread_rwlock_clockwrlock and sem_clockwait functions have been introduced in GNU C Library version 2.30. All the functions allow waiting against CLOCK_MONOTONIC and CLOCK_REALTIME. 
  • The GNU C Library version 2.30 has an added support of Unicode 12.1.0. Character encoding, character type info, and transliteration tables have also been updated to Unicode 12.1.0.
  • The dynamic linker will now accept the –preload argument to preload shared objects along with the LD_PRELOAD environment variable.
  • The getdents64, gettid, and tgkill functions have been added on Linux.
  • Memory allocation functions malloc, calloc, realloc, reallocarray, valloc, pvalloc, memalign, and posix_memalign will need object size smaller than PTRDIFF_MAX. This will help the memory allocation functions to avoid potential undefined behavior with pointer subtraction within the allocated object, which caused ptrdiff_t type overflow.

Deprecated features influencing compatibility

  • Functions like clock_gettime, clock_getres, clock_settime, clock_getcpuclockid, clock_nanosleep have been removed from the librt library for new applications.
  • The outdated  XSI STREAMS header files <stropts.h> and <sys/stropts.h> and the RES_INSECURE1 and RES_INSECURE2 option flags for the DNS stub have been abolished.
  • The support for “inet6” option in /etc/resolv.conf and the RES_USE_INET6 resolver flag have been eliminated.
  • The Linux-specific <sys/sysctl.h> header and the sysctl function have been removed from the GNU C Library version 2.30 and also will not be present in the future versions of glibc. The getentropy function can be used for obtaining random bits.

Bug Fixes in GNU C Library version 2.30

  • gettid() to have a wrapper in libc
  • nftw() does not return dangling symlink’s inode in libc
  • mtrace hangs when MALLOC_TRACE is defined in malloc
  • memusagestat is built using system C library in malloc
  • libpthread IFUNC resolver for vfork can lead to crash in nptl

These are select few updates. For more information, you may go through the libc sourceware page.

Read Next

Debian 10 codenamed ‘buster’ released, along with Debian GNU/Hurd 2019 as a port

Google proposes a libc in LLVM, Rich Felker of musl libc thinks it’s a very bad idea

GNU APL 1.8 releases with bug fixes, FFT, GTK, RE and more