News for hackers. Stuff that matters.
Re:Taming the UB Monsters in C++ by uecker on Monday March 31, 2025 @11:42AM (#43536327)
I believe the practical difference to 100% memory safety that Rust offers in theory, or the 99% memory safety you get in practice when using unsafe, compared to the 98% memory safety you can get today when writing decent modern C using abstractions such as string type and modern tooling is pretty irrelevant compared to all the other issues. Yes, the numbers are totally made up, but nothing I have seen so far convinces me that the reality is a lot different. Of course, there is a lot of old crappy legacy C code, and there will even be a lot of new crappy C code, but there will also be pretty bad Rust code. Now, if you like Rust, more power to you, I have no issue with people prefering Rust. But I think arguments for having to write in Rust for security reasons are mostly based on a series of fallacious arguments.
Re:Taming the UB Monsters in C++ by steveklabnik on Monday March 31, 2025 @12:16PM (#43536705)
> Yes, the numbers are totally made up, but nothing I have seen so far convinces me that the reality is a lot different.

This is really what a lot of all of this comes down to, Herb and the committee feel like you do, others feel that the numbers won't be that good. We'll see in time!

Re:Taming the UB Monsters in C++ by IshKebab on Monday March 31, 2025 @01:01PM (#43537216)
> We'll see in time!

If by "in time" you mean last year then yes...

https://security.googleblog.com/2024/09/eliminating-memory-s...

Re:Taming the UB Monsters in C++ by steveklabnik on Monday March 31, 2025 @01:43PM (#43537650)
I meant the opposite, the claim by sutter et al is that new C++ code that uses these new techniques will show the same results as this study shows for MSLs.
Re:Taming the UB Monsters in C++ by IshKebab on Monday March 31, 2025 @02:09PM (#43537924)
Oh I see. Yeah I agree. That's going to be a long time!
Re:Taming the UB Monsters in C++ by IshKebab on Monday March 31, 2025 @12:09PM (#43536625)
> Yes, the numbers are totally made up

Indeed.

> but nothing I have seen so far convinces me that the reality is a lot different

https://www.memorysafety.org/docs/memory-safety/#how-common-...

This is very well studied.

> Of course, there is a lot of old crappy legacy C code

Ahh... you don't make mistakes. I see.

Re:Taming the UB Monsters in C++ by uecker on Monday March 31, 2025 @12:53PM (#43537136)
I don't think anything "studied" there addresses my point.