Skip to content
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

android: stdlib stack overflow handlers are not installed #124823

Open
maurer opened this issue May 6, 2024 · 1 comment
Open

android: stdlib stack overflow handlers are not installed #124823

maurer opened this issue May 6, 2024 · 1 comment
Labels
C-bug Category: This is a bug. O-android Operating system: Android T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@maurer
Copy link
Contributor

maurer commented May 6, 2024

When updating the CI to newer NDK/APIs, I enabled aarch64-linux-android testing, and found that tests/ui/abi/stack-probes.rs was failing. Luckily, the stack probes themselves are working (the expected SIGSEGV is being triggered), but as the signal handler is not installed, the test fails and the user wouldn't receive a helpful error + backtrace in the real world.

The registration is currently in an odd state where the implementation is enabled for Linux but not Android, and yet contains Android-specific cfgs inside.

Enabling it (by adding "android" to both the mod cfg blocks) works on aarch64, but on arm, it fails because getauxval is missing from libc.

The route to fixing this:

  1. Add the getauxval declaration to libc android 32-bit (it's already in 64-bit). The original argument for not including it is that it was added in Android API 18. Since we're bumping to 21+ as the minimum API, that should not be an issue.
  2. Add android to the registration block
  3. Remove the ignore-android I'm about to add from tests/ui/abi/stack-probes.rs and tests/ui/abi/stack-probes-lto.rs and check that they still work.

cc @chriswailes Perhaps you'd like to take this one?

@maurer maurer added the C-bug Category: This is a bug. label May 6, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 6, 2024
@saethlin saethlin added O-android Operating system: Android T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels May 6, 2024
maurer added a commit to maurer/rust that referenced this issue May 7, 2024
Stack probes are working correctly, but the SIGSEGV handler is not
registered, so the expected message doesn't appear after running the
test.

Disable these to enable an aarch64-android runner.

Re-enablement is tracked at rust-lang#124823
@madsmtm
Copy link
Contributor

madsmtm commented May 15, 2024

Semi-duplicate of #25872, though this issue is more detailed.

maurer added a commit to maurer/rust that referenced this issue May 18, 2024
Stack probes are working correctly, but the SIGSEGV handler is not
registered, so the expected message doesn't appear after running the
test.

Disable these to enable an aarch64-android runner.

Re-enablement is tracked at rust-lang#124823
maurer added a commit to maurer/rust that referenced this issue Jul 10, 2024
Stack probes are working correctly, but the SIGSEGV handler is not
registered, so the expected message doesn't appear after running the
test.

Disable these to enable an aarch64-android runner.

Re-enablement is tracked at rust-lang#124823
maurer added a commit to maurer/rust that referenced this issue Jul 18, 2024
Stack probes are working correctly, but the SIGSEGV handler is not
registered, so the expected message doesn't appear after running the
test.

Disable these to enable an aarch64-android runner.

Re-enablement is tracked at rust-lang#124823
maurer added a commit to maurer/rust that referenced this issue Jul 19, 2024
Stack probes are working correctly, but the SIGSEGV handler is not
registered, so the expected message doesn't appear after running the
test.

Disable these to enable an aarch64-android runner.

Re-enablement is tracked at rust-lang#124823
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. O-android Operating system: Android T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants