How do you prevent "trusting trust" attacks with malicious compilers?
You don't need a trusted production-grade compiler. It's sufficient to have a really limited trusted compiler or even an untrusted compiler provided the triggers don't overlap.
https://www.schneier.com/blog/archives/2006/01/countering_trus.html
Related Posts
I would have thought that invoking a C compiler would be a solved problem. Looking at Rust's cc crate there's a remarkable long tail of corner cases to fix.
Exotic CPUs, microarchitectures, compiler differences, operating system differences, etc.
https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md
Some delightful examples of good compiler error messages in the latest Gleam release: https://gleam.run/news/context-aware-compilation/
Co-Authored-By: An old Stack Overflow answer, blindly accepting the compiler's suggestions, and a linter.