File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -16,16 +16,19 @@ to your program. You definitely *should not* invoke Undefined Behavior.
16
16
Unlike C, Undefined Behavior is pretty limited in scope in Rust. All the core
17
17
language cares about is preventing the following things:
18
18
19
- * Dereferencing null, dangling, or unaligned pointers
19
+ * Dereferencing null, dangling, or unaligned references or raw pointers
20
+ * Performing out-of-bounds arithmetic for the computation of a struct/tuple
21
+ field address
20
22
* Reading [ uninitialized memory] [ ]
21
23
* Breaking the [ pointer aliasing rules] [ ]
22
- * Producing invalid primitive values:
23
- * dangling/null references
24
+ * Producing/obtaining invalid primitive values:
25
+ * dangling/null/unaligned references
24
26
* null ` fn ` pointers
25
27
* a ` bool ` that isn't 0 or 1
26
28
* an undefined ` enum ` discriminant
27
29
* a ` char ` outside the ranges [ 0x0, 0xD7FF] and [ 0xE000, 0x10FFFF]
28
- * A non-utf8 ` str `
30
+ * a non-utf8 ` str `
31
+ * a compound type (` enum ` /` struct ` /array/tuple) with an invalid field
29
32
* Unwinding into another language
30
33
* Causing a [ data race] [ race ]
31
34
You can’t perform that action at this time.
0 commit comments