After six months of development announced the release of the system library GNU C Library 2.42 (Glibc) , which fully complies with ISO C23 and Posix.1-2024 standards. The new release had contributions from 70 developers.
The Glibc 2.42 release includes several improvements:
- Support for lightweight threads has been added to the pthread_create function, along with protection for Stack Guard Page to handle exceptions and emergency process completion (Sigsegv). This implementation utilizes the Madviseflag Madv_guard_install present in the Linux 6.13 kernel, allowing more efficient blocking of code execution outside the designated memory area without requiring additional virtual memory space.
- New math functions for exponentiation and root calculations have been added to the Math.h header file, including compoundn, pown, power, rootn, and rsqurt as per the ISO C23 standard. These functions support Float, Double, Long Double, _floatn, _floatnx data types, and a generic type from tgmath.h.
- On the Linux platform, the pthread_gettid_np function has been introduced to provide a unique thread identifier with enhanced error checking compared to the Gettid function, ensuring proper process termination in case of uncertain behavior.
- Functions for calculating absolute values for unsigned types (UABS, Ulabs, Ullabs, Uimaxabs) have been incorporated, aligning with future SI standards.
- The Termios.h software interface on Linux now supports arbitrary transmission speed values, with the Speed_T type redesigned to correspond to the “Unsigned Int” type in the Linux kernel.
- Enhancements have been made to the local cache (tcache) utilized in Malloc functions, enabling caching of large memory blocks. The maximum unit size can be adjusted through the Glibc.malloc.tcache_max setting, with speeds optimized for small block caching.
/Reports, release notes, official announcements.