Commit 7c99186
committed
Auto merge of rust-lang#105426 - flba-eb:fix_tls_destructor_unwinding, r=m-ou-se
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.1 file changed
+14
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
908 | | - | |
909 | | - | |
910 | 908 | | |
| 909 | + | |
911 | 910 | | |
912 | 911 | | |
913 | 912 | | |
| |||
1028 | 1027 | | |
1029 | 1028 | | |
1030 | 1029 | | |
1031 | | - | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
1032 | 1034 | | |
1033 | 1035 | | |
1034 | 1036 | | |
| 1037 | + | |
| 1038 | + | |
1035 | 1039 | | |
1036 | 1040 | | |
1037 | 1041 | | |
| |||
1044 | 1048 | | |
1045 | 1049 | | |
1046 | 1050 | | |
1047 | | - | |
1048 | | - | |
1049 | | - | |
1050 | 1051 | | |
| 1052 | + | |
1051 | 1053 | | |
1052 | 1054 | | |
1053 | 1055 | | |
| |||
1137 | 1139 | | |
1138 | 1140 | | |
1139 | 1141 | | |
1140 | | - | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
1141 | 1146 | | |
1142 | 1147 | | |
1143 | 1148 | | |
1144 | 1149 | | |
1145 | 1150 | | |
| 1151 | + | |
| 1152 | + | |
1146 | 1153 | | |
1147 | 1154 | | |
1148 | 1155 | | |
0 commit comments