|
|
Subscribe / Log in / New account

Rust in the Linux kernel (Google security blog)

Rust in the Linux kernel (Google security blog)

Posted Apr 20, 2021 19:32 UTC (Tue) by Bluehorn (subscriber, #17484)
In reply to: Rust in the Linux kernel (Google security blog) by mss
Parent article: Rust in the Linux kernel (Google security blog)

> The solution here is simple: just use C++ instead of Rust.

If using C++ is the solution I'd rather have the original problem. I am writing this even though C++ was my first OO language and I loved it back then (coming from C).

But I once had the misfortune to debug a crash in a big (n*100k lines of code) C++ application and spent two months (full time) on that. After that experience I'd rather avoid writing C++ code in a team.

Yes, you can absolutely write robust C++ code but that doesn't mean that you ever get to rewrite old "working" code in modern C++. In my case, the buggy code was 8+ years old and had an off-by-one error in a pointer arithmetic expression. I only found the cause using hardware catchpoints in gdb (no address space randomization at that time). Even without ASR the location of the problematic variable was not fixed and the crash did only happen at some times - after >12h of running the application.

Developer hell if you are tasked to fix the release-critical issue and $manager asks you every day if you finally found the bug. Don't go there!


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds