@@ -76,17 +76,16 @@ and the [stabilization report](https://github.com/rust-lang/rust/pull/130654)
76
76
77
77
### Strict provenance APIs
78
78
79
- In Rust, [ pointers are not simply an “integer” or
80
- “address”] ( https://rust-lang.github.io/rfcs/3559-rust-has-provenance.html ) . For
81
- instance, it’s uncontroversial to say that a Use After Free is clearly
82
- Undefined Behavior, even if you “get lucky” and the freed memory gets
83
- reallocated before your read/write. It is also uncontroversial that writing
84
- through a pointer derived from an ` &i32 ` reference is Undefined Behavior, even
79
+ In Rust, [ pointers are not simply an "integer" or
80
+ "address"] ( https://rust-lang.github.io/rfcs/3559-rust-has-provenance.html ) . For
81
+ instance, a "use after free" is undefined behavior even if you "get lucky" and the freed memory gets
82
+ reallocated before your read/write. As another example, writing
83
+ through a pointer derived from an ` &i32 ` reference is undefined behavior, even
85
84
if writing to the same address via a different pointer is legal. The underlying
86
85
pattern here is that * the way a pointer is computed matters* , not just the
87
86
address that results from this computation. For this reason, we say that
88
- pointers have ** provenance** : to fully characterize pointer-related Undefined
89
- Behavior in Rust, we have to know not only the address the pointer points to,
87
+ pointers have ** provenance** : to fully characterize pointer-related undefined
88
+ behavior in Rust, we have to know not only the address the pointer points to,
90
89
but also track which other pointer(s) it is "derived from".
91
90
92
91
Most of the time, programmers do not need to worry much about provenance, and
0 commit comments