logoalt Hacker News

Pointer Provenance in Rust vs. C++: Pointers Are Not Just Glorified Ints

21 points • by sofiabelenlopez • last Thursday at 9:32 AM • 10 comments • view on HN

Comments

afdbcreid • today at 5:17 PM

Ralf Jung's series (one of the prominent developers behind Rust's memory model and author of RustBelt) about pointers is very recommended:

https://www.ralfj.de/blog/2018/07/24/pointers-and-bytes.html

https://www.ralfj.de/blog/2020/12/14/provenance.html

https://www.ralfj.de/blog/2022/04/11/provenance-exposed.html

uecker • today at 8:33 PM

As far as I know, provenance is still a mess both on LLVM and GCC.

jayd16 • today at 5:21 PM

Does C++ pointer arithmetic invalidate this post or is there some other magic there?

➕ show 3 replies