You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most ABI strings come in two variants, one with an `-unwind` suffix and one without.
262
262
The `Rust` ABI always permits unwinding, so there is no `Rust-unwind` ABI. The
263
263
choice of ABI, together with the runtime [panic mode][panic-modes], determines
264
264
the behavior when unwinding out of a function.
265
265
266
+
r[items.fn.extern.unwind.behavior]
266
267
The table below indicates the behavior of an unwinding operation reaching each
267
268
type of ABI boundary (function declaration or definition using the
268
269
corresponding ABI string). Note that the Rust runtime is not affected by, and
@@ -293,10 +294,12 @@ from the "Native unwind" column in the table.
293
294
|`panic=abort`| unwinding |`panic` aborts without unwinding | abort |
294
295
|`panic=abort`| non-unwinding |`panic` aborts without unwinding |[undefined behavior]|
295
296
296
-
> **Note**: The following guarantee applies from Rust 1.82 onward: with
297
-
> `panic=unwind`, when a `panic` is turned into an abort by a non-unwinding
298
-
> ABI boundary, either no destructors (`Drop` calls) will run, or all destructors
299
-
> up until the ABI boundary will run.
297
+
r[items.fn.extern.abort]
298
+
With `panic=unwind`, when a `panic` is turned into an abort by a non-unwinding ABI boundary, either no destructors (`Drop` calls) will run, or all destructors
299
+
up until the ABI boundary will run.
300
+
301
+
> [!NOTE]
302
+
> Prior to Rust 1.82, it is possible for only some of the destructors to executive, and not others.
300
303
301
304
For other considerations and limitations regarding unwinding across FFI
302
305
boundaries, see the [relevant section in the Panic documentation][panic-ffi].
0 commit comments