-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Description
The \getenv\ doctest at \src/lib.rs\ line 438 hangs indefinitely on the \�rmv7-unknown-linux-gnueabihf\ CI target (ubuntu-24.04-arm runner). All other 28 doctests pass. The same doctest passes on all other platforms including \ humbv7neon-unknown-linux-gnueabihf\ (same ARM32 architecture, different instruction set).
Steps to reproduce
Run \cargo test --target armv7-unknown-linux-gnueabihf --doc\ on an ubuntu-24.04-arm GitHub Actions runner.
Evidence from CI logs
\
test src/lib.rs - (line 493) ... ok
test src/lib.rs - (line 438) has been running for over 60 seconds
\\
Job ID: 66241023177 in workflow run 22838910297.
Root cause analysis
The doctest patches the C \getenv\ function using injectorpp. On armv7, the patched function appears to enter an infinite loop or deadlock. Possible causes:
-
libc version change: The ubuntu-24.04-arm runner has been updated since the last successful main CI run (September 2025). A newer glibc may use a different \getenv\ implementation (e.g., different PLT/GOT layout, ifunc resolvers, or thread-safety wrappers) that conflicts with the ARM32 patching mechanism.
-
Cross-compilation artifact: armv7 tests are cross-compiled on an aarch64 host. The \getenv\ symbol resolution may differ from native armv7 compilation.
-
Thumb vs ARM mode: The armv7 target may compile \getenv\ call sites differently than thumbv7neon, affecting how the patched trampoline redirects execution.
Current workaround
PR #110 changed the ARM CI test command from \cargo test\ to \cargo test --tests\ to skip doctests on ARM targets. Doctests are still validated on x86_64 (Linux, Windows), aarch64 (Linux, Windows, macOS), and other platforms.
Environment
- Runner: ubuntu-24.04-arm (aarch64 host)
- Target: armv7-unknown-linux-gnueabihf (cross-compiled)
- Rust toolchain: stable
- Works on: x86_64, aarch64, thumbv7neon, macOS aarch64, Windows x86_64, Windows aarch64