Start update to musl v1.2.3#4443
Merged
tgross35 merged 10 commits intorust-lang:mainfrom May 12, 2025
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
This was referenced May 3, 2025
Closed
Contributor
Author
|
hmm, looks like I need to allow deprecation for CI to pass - will allow deprecated tomorrow. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
tgross35
requested changes
May 4, 2025
Contributor
tgross35
left a comment
There was a problem hiding this comment.
Thank you for working on this! A handful of small comments, most importantly we don't want to stop testing the current musl version because that needs to continue working until we do the final version bump. Also looks like there is a CI failure.
Contributor
Disregard this, that's not a good warning |
tgross35
added a commit
to tgross35/rust-libc
that referenced
this pull request
May 4, 2025
This was enabled in order to encourage canonical links. Unfortunately it seems to also create warnings for crosslinking issues [1], which is something we definitely do want contributors to do (especially considering how commits get cherry picked around in this repo, there may not be a PR to easily refer to). Disable `issue-links` for now to avoid this. This also means we lose canonical link warnings, but there wasn't really any specific reason we needed that anyway. Cc: rust-lang/triagebot#1965 [1]: rust-lang#4443 (comment)
tgross35
reviewed
May 4, 2025
tgross35
reviewed
May 4, 2025
tgross35
reviewed
May 5, 2025
Contributor
|
This looks pretty good as a first step to me, I think we can merge it once you get CI passing. @rustbot author |
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
This reflects upstream commit 2507e7f. This should be safe to change as this has been marked deprecated to warn people it will change across OS versions since 0.2.64 (>5 years ago) (backport <rust-lang#4443>) (cherry picked from commit 5d24ad2)
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
This isn't strictly related to musl 1.2.3, however now presents a good time to change it, before the 1.0 release. (backport <rust-lang#4443>) (cherry picked from commit 3f81aad)
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
The architecture-specific definitions was removed in upstream commit 319b2d0, changing the type to the generic definition of int. (backport <rust-lang#4443>) (cherry picked from commit 3f91173)
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
This silences shellcheck warnings (backport <rust-lang#4443>) (cherry picked from commit 60f7b3d)
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
This will be chosen based on the RUST_LIBC_UNSTABLE_MUSL_V1_2_3 variable. Co-authored-by: Daniel Frampton <Daniel.Frampton@microsoft.com> (backport <rust-lang#4443>) (cherry picked from commit e7762a8)
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
This commit gates various workarounds of older musl versions behind the RUST_LIBC_UNSTABLE_MUSL_V1_2_3 variable. (backport <rust-lang#4443>) (cherry picked from commit 85a7c85)
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
This was accidentally set to 0 in upstream, but fixed in commit b8b729b. If running with prior versions without that commit, this commit effectively backports it. (backport <rust-lang#4443>) (cherry picked from commit 686aa7a)
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
This feature, controlled by the environment variable RUST_LIBC_UNSTABLE_MUSL_V1_2_3 will control whether breaking changes up to musl v1.2.3 will be reflected (backport <rust-lang#4443>) (cherry picked from commit 2a68f7f)
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
This ut_session has changed from long to int + padding in newer versions. This was already reflected on loongarch64 and ohos - this commit adds this change, and re-enables the test when musl_v1_2_3 is set. Co-authored-by: Ariadne Conill <ariadne@dereferenced.org> (backport <rust-lang#4443>) (cherry picked from commit 1038c7f)
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
This reflects the upstream commits, 5e0c9f2 and d4f2981, which reflect changes in linux 5.4 and 5.5 respectively As mentioned in the comments, this is possible now as the CI musl version has updated and the headers are newer. (backport <rust-lang#4443>) (cherry picked from commit fb4212a)
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
This reflects upstream commit 2507e7f. This should be safe to change as this has been marked deprecated to warn people it will change across OS versions since 0.2.64 (>5 years ago) (backport <rust-lang#4443>) (cherry picked from commit 5d24ad2)
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
This isn't strictly related to musl 1.2.3, however now presents a good time to change it, before the 1.0 release. (backport <rust-lang#4443>) (cherry picked from commit 3f81aad)
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
The architecture-specific definitions was removed in upstream commit 319b2d0, changing the type to the generic definition of int. (backport <rust-lang#4443>) (cherry picked from commit 3f91173)
tgross35
pushed a commit
to tgross35/rust-libc
that referenced
this pull request
Jun 1, 2025
This silences shellcheck warnings (backport <rust-lang#4443>) (cherry picked from commit 60f7b3d)
Merged
This was referenced Jun 19, 2025
DorianNiemiecSVRJS
pushed a commit
to DorianNiemiecSVRJS/rust-libc
that referenced
this pull request
Jun 21, 2025
This commit gates various workarounds of older musl versions behind the RUST_LIBC_UNSTABLE_MUSL_V1_2_3 variable. (backport <rust-lang#4443>) (cherry picked from commit 85a7c85)
DorianNiemiecSVRJS
pushed a commit
to DorianNiemiecSVRJS/rust-libc
that referenced
this pull request
Jun 21, 2025
This was accidentally set to 0 in upstream, but fixed in commit b8b729b. If running with prior versions without that commit, this commit effectively backports it. (backport <rust-lang#4443>) (cherry picked from commit 686aa7a)
DorianNiemiecSVRJS
pushed a commit
to DorianNiemiecSVRJS/rust-libc
that referenced
this pull request
Jun 21, 2025
This feature, controlled by the environment variable RUST_LIBC_UNSTABLE_MUSL_V1_2_3 will control whether breaking changes up to musl v1.2.3 will be reflected (backport <rust-lang#4443>) (cherry picked from commit 2a68f7f)
DorianNiemiecSVRJS
pushed a commit
to DorianNiemiecSVRJS/rust-libc
that referenced
this pull request
Jun 21, 2025
This ut_session has changed from long to int + padding in newer versions. This was already reflected on loongarch64 and ohos - this commit adds this change, and re-enables the test when musl_v1_2_3 is set. Co-authored-by: Ariadne Conill <ariadne@dereferenced.org> (backport <rust-lang#4443>) (cherry picked from commit 1038c7f)
DorianNiemiecSVRJS
pushed a commit
to DorianNiemiecSVRJS/rust-libc
that referenced
this pull request
Jun 21, 2025
This reflects the upstream commits, 5e0c9f2 and d4f2981, which reflect changes in linux 5.4 and 5.5 respectively As mentioned in the comments, this is possible now as the CI musl version has updated and the headers are newer. (backport <rust-lang#4443>) (cherry picked from commit fb4212a)
DorianNiemiecSVRJS
pushed a commit
to DorianNiemiecSVRJS/rust-libc
that referenced
this pull request
Jun 21, 2025
This reflects upstream commit 2507e7f. This should be safe to change as this has been marked deprecated to warn people it will change across OS versions since 0.2.64 (>5 years ago) (backport <rust-lang#4443>) (cherry picked from commit 5d24ad2)
DorianNiemiecSVRJS
pushed a commit
to DorianNiemiecSVRJS/rust-libc
that referenced
this pull request
Jun 21, 2025
This isn't strictly related to musl 1.2.3, however now presents a good time to change it, before the 1.0 release. (backport <rust-lang#4443>) (cherry picked from commit 3f81aad)
DorianNiemiecSVRJS
pushed a commit
to DorianNiemiecSVRJS/rust-libc
that referenced
this pull request
Jun 21, 2025
The architecture-specific definitions was removed in upstream commit 319b2d0, changing the type to the generic definition of int. (backport <rust-lang#4443>) (cherry picked from commit 3f91173)
DorianNiemiecSVRJS
pushed a commit
to DorianNiemiecSVRJS/rust-libc
that referenced
this pull request
Jun 21, 2025
This silences shellcheck warnings (backport <rust-lang#4443>) (cherry picked from commit 60f7b3d)
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.
Description
This is effectively a partial continuation of #3068 (no time64 yet), however done behind a flag so people can test changes in 0.2. Some changes are not behind the musl_v1_2_3 config flag, and these are:
RLIM_NLIMITS. This one is definitely safe, as it has had a deprecation warning saying it could change any time with OS version for >5 yearsO_LARGEFILEis likely safe.tcp_infostruct, as these only add fields while keeping ABI. However, if manually initializing all fields this could cause breakage.Let me know if any of m assumptions are incorrect and I am happy to gate those changes behind the cfg as well.
I've also added #4437, as this seems like a good chance to rename the field while the cfg option is in place.
Sources
O_LARGEFILE change: https://github.com/bminor/musl/commit/b8b729bd22c28c9116c2fce65dce207a35299c26
RLIM_NLIMITS change: https://github.com/bminor/musl/commit/2507e7f5312e79620f6337935d0a6c9045ccba09
utmpx change: https://github.com/bminor/musl/commit/1e7f0fcd7ff2096904fd93a2ee6d12a2392be392
tcp_info changes: https://github.com/bminor/musl/commit/d4f298149c5e36ac5521888d645bfb65f4d027fc, https://github.com/bminor/musl/commit/5e0c9f246cf7c0d174b7b8fbd9e02d4729ff66d2
Checklist
CPU_SETSIZEchange (not urgent as changed after 1.2.3)libc-test/semverhave been updated*LASTor*MAXareincluded (see rust-lang/libc#3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI
@rustbot label +stable-nominated