-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add mallopt
and related constants for Android
#4459
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
base: main
Are you sure you want to change the base?
Conversation
Some changes occurred in the Android module cc @maurer |
0851796
to
b449162
Compare
b449162
to
b588ed3
Compare
mallopt
related constants for Androidmallopt
and related constants for Android
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
@rustbot label +stable-nominated
134e718
to
28abaf5
Compare
The `HeapTaggingLevel` enum does not have a typedef alias and thus generated tests will not compile due to the missing `enum` keyword. As a result the constants are defined using `i32` to match the signature for `mallopt`. See: https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/malloc.h;l=215
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chriswailes is this a newer change? It looks like there is a CI failure:
Running test/main.rs (target/aarch64-linux-android/debug/deps/main-eb05d161ceda646b)
/checkout/target/aarch64-linux-android/debug/deps/main-eb05d161ceda646b: 1 file pushed, 0 skipped. 8.0 MB/s (17585976 bytes in 2.098s)
status: exit status: 134
stdout ---
stderr ---
WARNING: linker: /data/local/tmp/main-eb05d161ceda646b: unsupported flags DT_FLAGS_1=0x8000001
CANNOT LINK EXECUTABLE "/data/local/tmp/main-eb05d161ceda646b": cannot locate symbol "mallopt" referenced by "/data/local/tmp/main-eb05d161ceda646b"...
Aborted
If this is a newer version than we test with, you can add a skip in libc-test/build.rs
.
This change is failing presubmit because of the old versions of the emulator and system image used by the CI. I'm working on two possible solutions to this issue:
It's going to be a week or two until I'm able to put significant time into addressing the issue. If you'd like I can close this pull request and re-open it once the Android test infrastructure is updated. |
If you need the change here sooner, you can also add a skip in It would be great to get the Android tests working better though. I don't know enough about it to know what the best solution is, but updates there would be very welcome at any time :) |
Description
This change adds constants that can be passed to BIONIC's implementation of
mallopt
Sources
Constant definitions in BIONIC source: https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/include/malloc.h;l=215
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI