]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #105426 - flba-eb:fix_tls_destructor_unwinding, r=m-ou-se
authorbors <bors@rust-lang.org>
Fri, 30 Dec 2022 12:58:50 +0000 (12:58 +0000)
committerbors <bors@rust-lang.org>
Fri, 30 Dec 2022 12:58:50 +0000 (12:58 +0000)
Catch panics/unwinding in destruction of TLS values

`destroy_value` is/can be called from C code (libc). Unwinding from Rust to C code is undefined behavior, which is why unwinding is caught here.

This problem caused an infinite loop inside the unwinding code when running `src/test/ui/threads-sendsync/issue-24313.rs` on a tier 3 target (QNX/Neutrino) on aarch64.

See also https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Infinite.20unwinding.20bug.


Trivial merge