Tech News
← Home  ·  All topics

Glibc

3 GoKawiil briefs on this topic

Blog post catalogs where GCC and Clang diverge from the C standard

A technical blog post lists concrete cases where GCC and Clang do not conform to the ISO C standard by default, including treatment of the asm keyword as a reserved extension and GCC's hardcoded FLT_ROUNDS macro that ignores runtime rounding-mode changes via fesetround. The author also flags unfinished coverage of the standard's five floating-point pragmas as an area of ongoing non-conformance.

C standard leaves strtod error detection non-portable across libc implementations

A blog post examines C17 section 7.25.2.6, which governs error handling for strtod, strtof, strtold and related string-to-float conversion functions. It explains that these functions' ability to report overflow or underflow via errno depends on the math_errhandling macro, and that on libraries like musl where MATH_ERRNO is not advertised, there is no standard-compliant way to detect these conversion errors. The author notes that Linux man pages for these functions omit this detail entirely.

Benchmarks show musl libc lags glibc by up to 26% even with mimalloc swapped in

A developer investigating containerized Rust performance found that musl's default memory allocator is significantly slower than glibc's, not just under high concurrency but even on modest 4-core EC2 instances. Swapping in mimalloc or jemalloc narrows the gap but doesn't close it—one workload remained 26% slower—because several of musl's core memory routines are themselves inefficient, not just its allocator.