libc: upgrade musl from 1.1.24 to 1.2.1#1396
Open
gburd wants to merge 1 commit into
Open
Conversation
Bump the bundled musl from 1.1.24 (released 2019) to 1.2.1 (2020), the last version with the BSD-style internal layout that OSv's libc shim expects before musl's 1.2.x re-architecture. The upgrade picks up roughly four years of bug fixes in stdio, math, dns, and threading. Fix nftw(): the legacy 1.1.24 implementation had an uninitialized field that was masked by 1.1.x's malloc behaviour but tripped UBSan under 1.2.1. Initialise it explicitly so nftw() returns the same results regardless of allocator state. Verified: tst-libc, tst-pthread, tst-dns-resolver, tst-fnmatch all pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bump the bundled musl from 1.1.24 (2019) to 1.2.1 (2020), the last musl
release with the BSD-style internal layout that OSv's libc shim expects
before musl's 1.2.x source re-architecture. The upgrade picks up roughly
four years of upstream bug fixes in stdio, math, dns, and threading.
This depends on PR 0 (modern-toolchain compat): musl 1.2.1 cannot build
on GCC 14 / Boost 1.87 without it. I verified that the lower_bound /
conditional_t breakage PR 0 fixes is toolchain breakage, not musl's --
bare master fails identically on the same toolchain.
Changes
musl_1.1.24submodule to the public musl v1.2.1 tag(73cc775b).
-isystem musl/arch/$(musl_arch)to the musl per-object includepath: 1.2.x relocated several arch-specific headers there.
include/api/sys/__socket.h: providestruct msghdr/struct cmsghdr(with correct big/little-endian padding) at the common path -- 1.2.x
moved them out of the arch-specific
bits/socket.h.libc/stdio/__string_read.c: add OSv's copy of__string_readand moveit from the
muslgroup to thelibcgroup (it is now referenced fromOSv-built stdio objects, not the musl tree).
-Wmaybe-uninitializedand initialise the fieldexplicitly so results no longer depend on allocator state (the 1.1.24
code relied on 1.1.x malloc zeroing).
-Wincompatible-pointer-typesontempnam/tmpnam/__map_file(musl 1.2.x signatures vs OSv's
syscall_to_function.hshim) -- ABIunchanged; these are OSv-shim build warnings only.
bits/header deltas (direntd_off, socket type)to match 1.2.1.
Notes
this is a within-1.x musl bump, deliberately stopping at 1.2.1 before
the 1.2.x internal re-architecture.
TZ cases require a zoneinfo database in the image; on an FHS host this
comes from
/usr/share/zoneinfoand the tests pass. (On a non-FHS hostthe manifest glob can miss tzdata and those cases read UTC -- a
packaging artifact, not a libc fault.)
multi-queue -> ...).