News for hackers. Stuff that matters.
Re:Writing a C Compiler, Part 1 by greenhouse_gas on Friday December 01, 2017 @12:31PM (#15825502)
You want verifiable builds, but that different algorithms should produce the same result.

Is this even possible?

And wouldn't it be easier to just verify the binary manually?

Re:Writing a C Compiler, Part 1 by dllthomas on Friday December 01, 2017 @01:15PM (#15825852)
I've not been able to confidently follow what the parent wrote, but if they're discussing diverse double compiling, the way it works is that you compile the same source code (S) with a bunch of different compilers (C0...CN). This gives you a bunch of executables (E0...EN) which are the compilation of S. Because C0...CN are different compilers, E0...EN will probably differ, bitwise. But because behavior should depend only on the source code, if those compilers are sufficiently correct E0...EN should behave the same. So if you compile S with E0...EN to get (say) E0'...EN', those should all be bitwise identical.
Re:Writing a C Compiler, Part 1 by dwheeler on Saturday December 02, 2017 @10:53AM (#15832367)
That's right. Details, demos, and formal proofs about diverse double compiling (DDC) can be found here on my web page: https://www.dwheeler.com/trusting-trust/
Re:Writing a C Compiler, Part 1 by DannyB2 on Friday December 01, 2017 @03:12PM (#15826929)
You said it way better than I did.

Also doing cross-compilation on different platforms should produce identical binaries, are at least identical behaving binaries.