about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize/src
diff options
context:
space:
mode:
authorjoboet <jonasboettiger@icloud.com>2025-05-23 18:00:09 +0200
committerjoboet <jonasboettiger@icloud.com>2025-05-23 18:00:09 +0200
commit8bf515330fb68ba10a54e9087a2b5629a968e766 (patch)
tree711e9152b23b731402aa0d9f592b13182847af71 /compiler/rustc_monomorphize/src
parent163cb4ea3f0ae3bc7921cc259a08a7bf92e73ee6 (diff)
downloadrust-8bf515330fb68ba10a54e9087a2b5629a968e766.tar.gz
rust-8bf515330fb68ba10a54e9087a2b5629a968e766.zip
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.
Diffstat (limited to 'compiler/rustc_monomorphize/src')
0 files changed, 0 insertions, 0 deletions