Skip to content

musl: fix CPU_SETSIZE #4439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

xbjfk
Copy link
Contributor

@xbjfk xbjfk commented May 1, 2025

Description

musl upstream has changed the size from 128 to 1024 in upstream commit
bc695a5, which is in versions 1.2.4+. I see this was fixed for loongarch in this repository, but this change applies to all architectures.

Sources

loongarch commit that changes this
upstream change
upstream permalink

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see rust-lang/libc#3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

I'm not sure if this can be nominated for 0.2. I would appreciate if someone could confirm.

NOTE: review/merge after #4438 - it includes a commit from that PR.

xbjfk added 2 commits May 1, 2025 11:20
Since musl 1.2.0, the utmpx.ut_session type changed from long to int
(with padding). For now, skip the test for this field.
Fixes: 3305
musl upstream has changed the size from 128 to 1024 in upstream commit
bc695a5, which is in versions 1.2.4+
@xbjfk
Copy link
Contributor Author

xbjfk commented May 1, 2025

Hmmm, looks like the CI uses a version of musl from 6 years ago (1.1.24). Maybe the version should be upgraded? It feels awkward essentially keeping musl bugs around longer than they need to be to appease the CI which tests against an ancient version. RLIM_NLIMITS has the same issue.

@xbjfk
Copy link
Contributor Author

xbjfk commented May 1, 2025

Since it seems the minimum supported musl version by rust has been 1.2.3 for 2 years already, I think it is safe to update the CI version. I will look into this soon, and combine this with #3068 and #4438, as well as fix the other issues I am having when running tests (such as RLIM_NLIMITS being 16 now)

@tgross35
Copy link
Contributor

tgross35 commented May 2, 2025

Musl indeed really needs to be updated, it needs some help to get over the line (thank you for offering!).

Unfortunately we can't easily change things all at once because there are some user-visible breaks. I think the best solution is probably to add the new interfaces bit-by-bit under a new cfg(musl_v1_2), which can be set via an unstable environment variable for experimentation before the final switch (which will probably be libc's 1.0).

This is similar to what is being done for glibc's time, #4433.

@xbjfk
Copy link
Contributor Author

xbjfk commented May 3, 2025

I agree that there should be a new config option - I think the priority would be to get tests fully working on 1.2.3, and focus on making those changes compatible with libc 0.2. There are a couple of constant changes that will be non-breaking

@xbjfk
Copy link
Contributor Author

xbjfk commented May 3, 2025

Closing in favor of #4443

@xbjfk xbjfk closed this May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants