arendjr@programming.dev to Programming@programming.devEnglish · 5 days agoFeds: Critical Software Must Drop C/C++ by 2026 or Face Riskthenewstack.ioexternal-linkmessage-square28fedilinkarrow-up182arrow-down19cross-posted to: tech@pawb.socialrust@lemmit.online
arrow-up173arrow-down1external-linkFeds: Critical Software Must Drop C/C++ by 2026 or Face Riskthenewstack.ioarendjr@programming.dev to Programming@programming.devEnglish · 5 days agomessage-square28fedilinkcross-posted to: tech@pawb.socialrust@lemmit.online
minus-squarearendjr@programming.devOPlinkfedilinkarrow-up31·edit-25 days agoUsing smart pointers doesn’t eliminate the memory safety issue, it merely addresses one aspect of it. Even with smart pointers, nothing is preventing you from passing references and using them after they’re freed.
minus-squarerefalo@programming.devlinkfedilinkarrow-up2arrow-down12·5 days agoTo be fair, it’s entirely possible to make the same and very similar mistakes in Rust, too.
minus-squarerobinm@programming.devlinkfedilinkarrow-up1·1 day ago Is it possible to do in Rust? Yes Is possible to do in Rust, by mistake, and not easily caught by a review? Definitively not.
minus-squarerefalo@programming.devlinkfedilinkarrow-up1·19 hours agoI think you could argue the same point with C++
minus-squareGetOffMyLan@programming.devlinkfedilinkarrow-up8arrow-down1·edit-25 days agoI’m fairly sure use after free isn’t possible unless you explicitly use unsafe code right? It’s compiler enforced is the point.
Using smart pointers doesn’t eliminate the memory safety issue, it merely addresses one aspect of it. Even with smart pointers, nothing is preventing you from passing references and using them after they’re freed.
To be fair, it’s entirely possible to make the same and very similar mistakes in Rust, too.
Yes
Definitively not.
I think you could argue the same point with C++
I’m fairly sure use after free isn’t possible unless you explicitly use unsafe code right?
It’s compiler enforced is the point.