News for hackers. Stuff that matters.
Re:Compilers are hard by pjmlp on Thursday January 21, 2021 @05:07AM (#25857308)
Or create OSes where applications are all written in managed languages, and the use of GCC and clang is gate keeped to the OS vendor and native libraries, just an idea.
Re:Compilers are hard by MaxBarraclough on Thursday January 21, 2021 @07:15AM (#25858096)
Bit of a nitpick, but the real value is in safe languages, rather than managed languages, no? The distinction is a little blurry, admittedly, but as an example, I figure that verified SPARK counts as safe but unmanaged.
Re:Compilers are hard by pjmlp on Thursday January 21, 2021 @07:19AM (#25858122)
Because as you might have guessed, I was speaking of iOS, Android and ChromeOS, while SPARK as much as I like it, is a very niche technology.
Re:Compilers are hard by MaxBarraclough on Thursday January 21, 2021 @07:30AM (#25858180)
I should have gone with a less niche example: the safe subset of Rust. D also has a safe subset.
Re:Compilers are hard by pjmlp on Thursday January 21, 2021 @08:55AM (#25858772)
Still niche, Rust is not up to the stuff that app developers expect in terms of tooling and D still has quite a few @safe bugs to sort out, among its current adoption issues.

Unfortunely regardless of their own reports regarding CVEs, Microsoft, Apple and Google keep turning to C and C++ for their bottom layers + managed languages, instead of going full speed in some of those alternatives.

So it appears to be the long term solution to mitigate security issues, while keeping compatibility with existing code and tooling.

Re:Compilers are hard by eru on Thursday January 21, 2021 @07:15AM (#25858102)
Why use managed languages when you can prove your code correct?
Re:Compilers are hard by pjmlp on Thursday January 21, 2021 @07:20AM (#25858131)
With what, Frama-C? Good luck getting it adopted outside domains that enforce its use for code certification.
Re:Compilers are hard by eru on Wednesday January 27, 2021 @12:56AM (#25924801)
Frama-C is a specific compiler. It has not much to do with proving your own code. (And C ain't a good language for writing code you want to prove correct in.)

You are right that after having proven your code correct, you might want to use an implementation (compiler or interpreter), that is also proven correct. But those are still two different things.

Re:Compilers are hard by dhekir on Thursday January 28, 2021 @02:54AM (#25939332)
Frama-C is a framework for code analysis. It can help proving code with the aid of ACSL (JML-like notation for C contracts).

But I agree that C is not the best language for writing critical code.