@@ -214,9 +214,15 @@ behavior when unwinding out of a function.
214
214
215
215
The table below indicates the behavior of an unwinding operation reaching each
216
216
type of ABI boundary (function declaration or definition using the
217
- corresponding ABI string). Additionally, ` C ` in the ABI strings may be
218
- substituted with ` stdcall ` or any other ABI (other than ` Rust ` )
219
- supported by the language implementation.
217
+ corresponding ABI string). Note that the Rust runtime is not affected by, and
218
+ cannot have an effect on, any unwinding that occurs entirely within another
219
+ language's runtime, that is, unwinds that are thrown and caught without
220
+ reaching a Rust ABI boundary.
221
+
222
+ The "unwinding" ABI category refers to ` "Rust" ` (the implicit ABI of Rust
223
+ functions not marked ` extern ` ), ` "C-unwind" ` , and any other ABI with ` -unwind `
224
+ in its name. The "non-unwinding" ABI category refers to all other ABI strings,
225
+ including ` "C" ` and ` "stdcall" ` .
220
226
221
227
Native unwinding is defined per-target. On targets that support throwing and
222
228
catching C++ exceptions, it refers to the mechanism used to implement this
@@ -225,12 +231,12 @@ unwinding"][forced-unwinding]; `longjmp` on Windows and `pthread_exit` in
225
231
` glibc ` are implemented this way. Forced unwinding is explicitly excluded
226
232
from the "Native unwind" column in the table.
227
233
228
- | panic runtime | ABI | ` panic ` -unwind | Native unwind (unforced) |
229
- | -------------- | ------------ | ------------------------------------- | ----------------------- |
230
- | ` panic=unwind ` | ` "C-unwind" ` | unwind | unwind |
231
- | ` panic=unwind ` | ` "C" ` | abort | [ Undefined Behavior] |
232
- | ` panic=abort ` | ` "C-unwind" ` | ` panic! ` aborts (no unwinding occurs) | abort |
233
- | ` panic=abort ` | ` "C" ` | ` panic! ` aborts (no unwinding occurs) | [ Undefined Behavior] |
234
+ | panic runtime | ABI | ` panic ` -unwind | Native unwind (unforced) |
235
+ | -------------- | ------------ | ------------------------------------- | ----------------------- |
236
+ | ` panic=unwind ` | unwinding | unwind | unwind |
237
+ | ` panic=unwind ` | non-unwinding | abort | [ Undefined Behavior] |
238
+ | ` panic=abort ` | unwinding | ` panic! ` aborts (no unwinding occurs) | abort |
239
+ | ` panic=abort ` | non-unwinding | ` panic! ` aborts (no unwinding occurs) | [ Undefined Behavior] |
234
240
235
241
[ panic-modes ] : ../panic.md#panic-runtimes
236
242
[ forced-unwinding ] : https://rust-lang.github.io/rfcs/2945-c-unwind-abi.html#forced-unwinding
0 commit comments