News for hackers. Stuff that matters.
Re:RFC: C++ Buffer Hardening by scrubs on Thursday October 06, 2022 @10:05AM (#33108303)
If C++ could, and I think with some respect and acknowledgement to others as having gotten it better, adopt two improvements:

* library/language side: some domain of bullet proof memory

* compiler/language side: move build dependencies into the compiler or something that frontends the compiler ala GO/Rust with a flag to enforce it so it's optional. Here don't let perfect be the enemy of the good. There'd need be some new keywords or namespaces to make this work.

That'd be superb

I have all kinds of chances and opportunities to learn Rust but our eco system is endless C/C++. So I'd rather not deal with another complicated language. There's no near term or medium term timeline to move even 20% into Rust. I bail out to GO for I/O bound work.

Re:RFC: C++ Buffer Hardening by maldev on Thursday October 06, 2022 @11:25AM (#33109462)
There's multiple frameworks which give bullet proof memory usages and other fixes through annotations. The most common being https://learn.microsoft.com/en-us/cpp/code-quality/understan... . People just dont use them besides kernel devs, and even then they don't really use it.

I believe the entire MS kernel is written using this.

Re:RFC: C++ Buffer Hardening by pianoben on Thursday October 06, 2022 @11:59AM (#33109961)
a) Not just the Windows kernel - Office uses SAL, too, in numerous places. Mostly in legacy places predating more modern C++. b) It's not true to say that kernel devs don't really use it. They use it a lot, though there are attempts at obsoleting some of it[0].

[0]: https://github.com/microsoft/wil

Re:RFC: C++ Buffer Hardening by maldev on Thursday October 06, 2022 @01:02PM (#33110906)
Oh nice, I didn't know that about office, it makes sense though. I don't work for Microsoft and mainly work in the Antivirus space, so I only occasionally hear stories from friends about their internal stuff. When I said driver devs don't always use it, I mainly meant third party vendors writing kernel code. I know alot of the overseas places don't, and I've rarely had jobs which use it.
Re:RFC: C++ Buffer Hardening by pianoben on Friday October 07, 2022 @11:51AM (#33122973)
Oh, I'd buy that in a heartbeat. SAL is, shall we say, most useful in the presence of non-public tooling, and it's also in general a fairly awkward language extension. Doesn't surprise me at all to hear that third-party devs haven't taken it up.
Re:RFC: C++ Buffer Hardening by yakubin on Thursday October 06, 2022 @12:37PM (#33110502)
This looks like Ada.