rust/library/std/src/sys/thread_local
Matthias Krüger d096ebf8d9
Rollup merge of #141455 - joboet:tls_exhaustion_abort, r=tgross35
std: abort the process on failure to allocate a TLS key

The panic machinery uses TLS, so panicking if no TLS keys are left can lead to infinite recursion (see https://github.com/rust-lang/rust/issues/140798#issuecomment-2872307377). Rather than having separate logic for the panic count and the thread name, just always abort the process if a TLS key allocation fails. This also has the benefit of aligning the key-based TLS implementation with the documentation, which does not mention that a panic could also occur because of resource exhaustion.
2025-06-03 21:53:36 +02:00
..
destructors cfi: Remove #[no_sanitize(cfi)] for extern weak functions 2025-04-11 10:15:55 +00:00
guard docs: fix typos 2025-05-22 22:47:36 +08:00
key std: abort the process on failure to allocate a TLS key 2025-05-23 18:00:09 +02:00
native Address review comments. 2025-05-30 12:14:27 +02:00
mod.rs Rollup merge of #139121 - thaliaarchi:rename-thread_local-statik, r=Noratrieb 2025-04-05 19:40:24 +02:00
no_threads.rs Rename internal module from statik to no_threads 2025-04-04 20:31:15 -07:00
os.rs Remove obsolete MinGW ThinLTO+TLS workaround 2025-02-17 22:10:25 +00:00