Skip to content

Commit 44f35ba

Browse files
committed
move longjmp bullet under 'Violating assumptions...'
1 parent 19322d4 commit 44f35ba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/behavior-considered-undefined.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ Please read the [Rustonomicon] before writing unsafe code.
5959
* Executing code compiled with platform features that the current platform
6060
does not support (see [`target_feature`]), *except* if the platform explicitly documents this to be safe.
6161
* Calling a function with the wrong [call ABI][abi].
62-
* Deallocating a Rust stack frame without executing destructors
63-
for local variables owned by the stack frame. This can occur
64-
with C functions like `longjmp`.
6562
* Producing an [invalid value][invalid-values]. "Producing" a
6663
value happens any time a value is assigned to or read from a place, passed to
6764
a function/primitive operation or returned from a function/primitive
@@ -75,8 +72,11 @@ Please read the [Rustonomicon] before writing unsafe code.
7572
cast, e.g. by doing raw pointer casts or using a union.
7673
* Violating assumptions of the Rust runtime. This is only possible using
7774
mechanisms outside Rust. Most assumptions of the Rust runtime are currently
78-
not explicitly documented. For assumptions specifically related to unwinding,
79-
see [unwinding-ub].
75+
not explicitly documented.
76+
* For assumptions specifically related to unwinding, see [unwinding-ub].
77+
* Deallocating a Rust stack frame without executing destructors for local
78+
variables owned by the stack frame is always undefined. This can occur with
79+
C functions like `longjmp`.
8080

8181
> **Note**: Undefined behavior affects the entire program. For example, calling
8282
> a function in C that exhibits undefined behavior of C means your entire

0 commit comments

Comments
 (0)