Spurious test out-of-stack test failure on Android

bfb766c
Opened by Aaron Turon at 2025-03-01 11:33:34

See https://gist.github.com/aturon/6c03914f968084548cd6 for an example. @alexcrichton dug into this and found strange behavior but wasn't able to make sense of it.

The test is going to be marked ignore on android for the time being.

  1. @alexcrichton can you fill out the details here?

    Aaron Turon at 2014-12-19 02:51:44

  2. The best that I could ever figure out here was that it may be some form of codegen bug, but I could never track it down. The failure mode here was that while panicking a debug_assert! was trigged in a RefCell borrow, causing everything to go downhill from there, eventually causing the oom handler to run.

    I stepped through into the destructor of BorrowRefMut, but the self pointer was off by ~16 bytes. The memory of where I thought the RefCell resided looked totally ok, but the pointer inside of BorrowRefMut was way off.

    I may have been just been tracing wrong, though. I also saw really weird things like strex failing in a single-threaded context whenever I used stepi in gdb, which I would not expect to happen!

    Alex Crichton at 2014-12-19 03:24:45

  3. Triage: over a year later, no changes that I'm aware of, and this is still ignored on android.

    Steve Klabnik at 2016-02-02 16:51:30

  4. Filed https://github.com/rust-lang/rust/pull/41618 to unignore the test and see how it goes. If you see this test fail, please either file a PR to revert mine (once it lands) or let me know and I'll do so.

    Mark Rousskov at 2017-04-29 03:03:38

  5. #41618 failed, this is not ready to be re-enabled.

    Mark Rousskov at 2017-04-29 20:56:49

  6. Triage: test still disabled https://github.com/rust-lang/rust/blob/master/src/test/run-pass/out-of-stack.rs#L3

    Steve Klabnik at 2019-03-11 17:48:38

  7. Triage (2025): test still disabled on Android

    许杰友 Jieyou Xu (Joe) at 2025-01-23 07:21:19