Building a Rust-style static analyzer for C++ with AI
The project is available at: https://github.com/shuaimu/rusty-cpp As someone who has spent almost 15 years doing systems research with C++, I am deeply troubled by all kinds of failures, especially segmentation faults and memory corruptions. Most of these are caused by memory issues: memory leaks, dangling pointers, use-after-free, and many others. I’ve had many cases where I have a pointer that ends with an odd number. The last one literally happened last month. It gave me so many sleepless nights. I remember a memory bug that I spent a month but still could not figure out, and I ended up wrapping every raw pointer I could find with shared_ptr. So I always wished for some mechanical way that can help me eliminate all possible memory failures. The Rust Dream (and the C++ Reality) Rust…