Re:How to Write Portable C Without Complicating Your Build
by jacobush on Friday March 31, 2017 @07:12AM
(#14002656)
In safety stuff, not only has the source to be vetted. Also the compiler building the target binary must be blessed and hopefully well understood.
[ Parent
| on HN ]
Re:How to Write Portable C Without Complicating Your Build
by kodfodrasz on Friday March 31, 2017 @07:42AM
(#14002777)
I have seen a certified compiler (GreenHill) compiling invalid code happily (not one relying on undefined behaviors), despite its certifications, for which even an ancient 3.x gcc complained (rightfully!)
These certifications unfortunately often are on the level of the golden shields CAs provide to customers to put on their sites as sign of trustworthiness.
So yes, blessed is a nice word for it.
Re:How to Write Portable C Without Complicating Your Build
by jacobush on Friday March 31, 2017 @08:39AM
(#14003065)
I hate GreenHill C compiler as much as the next guy [insert huge rant] but the Blessed Compiler of Choice in its frozen buggy state at least usually means it's a KNOWN ENTITY. We code around the bugs, we compile in -O0 mode etc etc, we analyze the assembler output to death and so on.
I see these "certified" stamps less as "secure" and more of a huge slowing down of progress and change - which strangely can translate to more secure since you know what you are dealing with.
If I can dream, I'd take a "certified" GNU Ada, or Rust, or something over C. But that is bound to take many years to happen if ever. I think we sooner will see Rust compiled to C which is fed to something like the abominable Greenhill so security consultants can pour over the intermediate C output and put it through the abominable Greenhill.
Re:How to Write Portable C Without Complicating Your Build
by aidenn0 on Friday March 31, 2017 @10:41AM
(#14004257)
For safety stuff I've worked on, the source had to be vetted, and then someone goes through line by line and confirms that the assembly generated for each line of code matches the source code. For C or Ada with conservative optimizations, this is fairly mechanical (and extremely boring), but means that trusting the compiler is not a requirement.