Cannot allocate memory in static TLS block
⚓ Rust 📅 2025-08-25 👤 surdeus 👁️ 12Hey, all. I'm working on a linter based on dylint and I'm getting this error while trying to run dylint:
Failed to load library $TARGET/release/lib$NAME@nightly-2025-08-07-x86_64-unknown-linux-gnu.so: $HOME/.rustup/toolchains/nightly-2025-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-12dbd1970610030b.so: cannot allocate memory in static TLS block
Running readelf -Wl .../librustc_driver-12dbd1970610030b.so shows that this SO by itself is trying to allocate 8.6 KiB of TLS, which if my understanding that the limit on Linux is 2 KiB, would be simply wrong. Am I missing something or is this build of rustc_driver simply broken? Is there any way I can work around this?
Thanks.
2 posts - 2 participants
🏷️ Rust_feed