News for hackers. Stuff that matters.
Re:There’s a Hole in the Bottom of the C: Effectiveness of A... by andrewflnr on Wednesday November 14, 2018 @06:48PM (#18455426)
They had pascal and friends, didn't they? Which are safer, safe-ish, right? But I guess today you could eat the cost of automatically inserted runtime checks on software designed to push the limits of 30yo hardware. Still won't fly for Linux or embedded systems...
Re:There’s a Hole in the Bottom of the C: Effectiveness of A... by pjmlp on Thursday November 15, 2018 @01:25AM (#18457308)
There is this expression, a language is a dialect with an army.

The same applies to system languages, just that the army is the OS that bundles them as THE official language.

Pascal based OSes unfortunately lost their place on the market.

To pick a more modern example, how many people would have bothered with JavaScript if it wasn't THE language on the Web OS?

Re:There’s a Hole in the Bottom of the C: Effectiveness of A... by nickpsecurity on Wednesday November 14, 2018 @08:31PM (#18456128)
Schemes for memory safety of C code have already been applied to UNIXy OS's. SVA-OS with SAFEcode used FreeBSD.

Far as embedded, there were some done in Ada and a Java subset. There's even real-time GC's for that kind of stuff. One or two companies sell Java processors that run it natively. CompSci stays doing CPU extensions that could work with MCU's.

Re:There’s a Hole in the Bottom of the C: Effectiveness of A... by pcwalton on Wednesday November 14, 2018 @08:20PM (#18456057)
The versions of Pascal that are practical aren't any safer than C.

With a properly designed programming environment, you don't need many bounds checks to begin with. Almost every embedded system can easily afford the cost of the few you can't eliminate.

Re:There’s a Hole in the Bottom of the C: Effectiveness of A... by pjmlp on Thursday November 15, 2018 @01:21AM (#18457294)
On the contrary.

While they aren't Rust level safe, they eliminate like 80% of the common C safety errors.

Thanks to explicit conversions, proper enums, reference parameters, actual string and vector types, memory allocation based on types instead of arbitrary numbers, type safe linkage thanks modules.

So while use after free or double frees would are still an issue, many other classes of typical C errors would be gone.

Re:There’s a Hole in the Bottom of the C: Effectiveness of A... by pcwalton on Thursday November 15, 2018 @12:19PM (#18461161)
Conversions and such aren't where the memory-safety-related vulnerabilities in C++ come from nowadays. They come from memory management problems, which Pascal doesn't help with.
Re:There’s a Hole in the Bottom of the C: Effectiveness of A... by pjmlp on Thursday November 15, 2018 @04:49PM (#18463749)
Moving goal posts here? I thought we were speaking about C.

Yes Rust is great and all, sometimes getting people half-way is better than not at all.

Re:There’s a Hole in the Bottom of the C: Effectiveness of A... by andrewflnr on Thursday November 15, 2018 @07:53PM (#18465172)
He probably meant to type C/C++ or something but typo'd it. The set of vulnerabilities is exactly the same. If Pascal still lets you do heap corruption, it's only a matter of time before RCEs become common. So yeah, I'm convinced on that point.