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