63 words
1 minutes
Rust_Memory_Safety
2024-01-01

link#


Rust memory Safety#

Memory BugHow Rust Prevents It
Use-after-freeOwnership system; compiler rejects access after move
Double-freeSingle ownership; only one drop
Dangling pointersLifetime analysis at compile time
Data racesBorrowing rules + Send/Sync traits
Buffer overflowsBounds checking on array access; the type system also statically checks some buffers
Null dereferenceOption<T> forces handing
Rust_Memory_Safety
https://younghakim7.github.io/blog/posts/rust_memory_safety/
Author
YoungHa
Published at
2024-01-01