News for hackers. Stuff that matters.
Re:Memory safety CVEs differ between Rust and C/C++ by josephg on Monday June 15, 2026 @10:39PM (#48549861)
> Rust already has warts from bad API designs that constrains performance and they are unlikely to ever be fixed even with new editions.

Like what?

> Aliasing has yet to provide any real benefit for Rust and a hell of a lot of issues.

Yeah, the performance wins so far are quite small. But rust's noalias-by-default did unearth a whole lot of latent bugs in LLVM. Even if you don't care about rust, its great that rust led LLVM to track down and fix these bugs. They affected C/C++ code too.

> realistically anyplace that aliasing matter c/c++ will just drop __restrict on it.

Is there a way to tell? When I'm writing C, I have no idea if using restrict will help other than staring at the assembly. (Or just trying it). I'm also leery of using restrict in C because its so hard to audit callers. How do you know when restrict is safe?

Re:Memory safety CVEs differ between Rust and C/C++ by 1718627440 on Tuesday June 16, 2026 @04:00AM (#48552061)
> When I'm writing C, I have no idea if using restrict will help other than staring at the assembly.

It's also a statement, whether you want callers to pass the same object to different parameters. If that doesn't make sense or you don't want that, write restrict.