A walkthrough of OSTEP Chapter 14 covering C memory allocation fundamentals: stack vs. heap, the malloc/free API, and a catalog of common memory bugs including buffer overflows, dangling pointers, double frees, and memory leaks. The discussion extends to how modern languages address these issues — garbage collection in Java, Go, and Python, and Rust's compile-time ownership model — along with the industry push toward memory-safe languages driven by the NSA and White House citing that ~70% of serious CVEs in large C/C++ codebases are memory safety bugs.

6m read timeFrom muratbuffalo.blogspot.com
Post cover image
Table of contents
Stack vs. HeapThe APIThe Rogues' Gallery of Memory BugsDiscussion

Sort: