use PIE (full ASLR) by default on Android too - #17448
Conversation
|
We can't just instantly drop backtrace support on android, this needs to at least be investigate somewhat to see why backtraces are broken on android. |
|
@alexcrichton: Rust currently has no support for current Android versions at all because they only run executables built with PIE. Lacking support for the platform is worse than lacking symbol names in backtraces. |
|
The Android bot needs to be updated in order for this to have a chance of working. It isn't going to be possible to upgrade it without using PIE, because Android no longer allows non-PIE. Anyway, there's nothing I can do about that so I'll leave this here to rot. |
|
Let's please slow down a bit here.
|
When did I say this? They work fine with PIE on Linux.
The NDK and Android version are out-of-date. Android has full support for PIE now and it became mandatory when there were no remaining problems. I know it's out-of-date because it's still working.
It doesn't break compatibility. |
|
So the problem at hand is that enabling PIE breaks backtraces on android, do you know why that happens? It sounds like you're not willing to investigate, why I asked the questions. |
|
It works fine with |
|
Building without PIE will still work fine for older versions of Android. The patch removing support for non-PIE isn't in any released version of Android yet. There have recently been a lot of unwinder fixes in AOSP as well. Is it possible that the unwinder tests would be fixed by those? |
|
@thestinger, have you manually verified that this test passes on an updated android compiler/client? I've tested manually against what I believe is r9d and both the test and the bundled gdb itself fail to get symbols or backtrace correctly. |
Android no longer permits non-PIE executables. Closes #17437
|
I think I accidentally did this in my branch, and I can confirm that the tests pass with r10c. |
…-lang#17448) `four_forward_slashes` scans the lines above an item for `////` comments and suggests turning them into `///`. It derives the item's start line from a span folded over the item's doc-comment attributes, but that fold included *inner* doc comments (`//!`). An inner `//!` inside a body lowers onto the item with `AttrStyle::Inner`; folding its span pushes the item's end line down into the body, so the upward scan then flags a regular `////` comment there. Applying the suggestion rewrites it to `///`, which documents nothing and fails to compile (E0585). Repro from the issue: ```rust pub fn main() { //// I am not a doc comment! //! another comment } ``` Fix: fold in outer doc comments only, mirroring the existing pattern in `clippy_lints/src/doc/suspicious_doc_comments.rs`. A genuine `////` typo above an item still lints, and I added a regression test for the inner-doc case. Fixes rust-lang/rust-clippy#16168 changelog: [`four_forward_slashes`]: no longer fires on `////` comments that sit above an inner doc comment (`//!`) in an item's body --- Disclosure: I used AI assistance to help diagnose the root cause and draft this change. It's a small, self-contained fix that I've reviewed, tested locally (`cargo uitest` + `cargo dev fmt`), and can explain.
Android no longer permits non-PIE executables.
Closes #17437