3 ms·
They can consider it cheating, but they themselves use previously-compiled compilers to build, do they not? The only difference is that their previously-compil
by cryptonector 4y ago
They can consider it cheating, but they themselves use previously-compiled compilers to build, do they not? The only difference is that their previously-compiled compilers are not in the same source repositories as the compilers they are used to build. That is no guarantee that the Thompson attack is defeated.
The best way to defeat the Thompson attack is to insist on multiple distinct implementations -by different authors- of the implementations of each programming language, and even this only makes Thompson attacks a lot harder to pull off -but not impossible- for determined attackers. But one cannot insist on multiple distinct implementations for every new programming language, as that would simply make new programming language R&D to be prohibitively expensive.
Zig could, and arguably should switch to an OpenJDK-style bootstrapping system to please the distros. Essentially this means that using new language features in the Zig compiler has to wait until those new language features appear in a released version. Whether this is realistic, idk. In any case, Zig can also keep the stage0 in the repository for use by developers (but not distros).
- pabs3 4y agoThey do not use previously-compiled compilers, no. Instead they are working on building an entire distro starting with ~512 bytes of machine code plus a ton of source. They aren't there yet, but are getting closer. The Thomson defeat you mention sounds like diverse double compiling, by David A. Wheeler. https://dwheeler.com/trusting-trust/ https://dwheeler.com/trusting-trust/ I don't think what OpenJDK has is something that Guix/Bootstrappable folks would like either, they had to bootstrap off the Jikes implementation in C++ instead: https://bootstrappable.org/projects/java.html https://bootstrappable.org/projects/java.html