8 ms·
For beginners, it is probably best to assume the compiler is right. For the rest of us, the compiler is usually right, except when it's not. See the extensive
by nitrogen 13y ago
For beginners, it is probably best to assume the compiler is right. For the rest of us, the compiler is usually right, except when it's not. See the extensive work of John Regehr on automated compiler bug discovery and related compiler work: http://blog.regehr.org/archives/category/compilers http://blog.regehr.org/archives/category/compilers
- smcl 13y agoAbsolutely. I utilised John Regehr's work on this on my previous job - uncovered a bunch of bugs ranging from compiler crashes to inconsistent output between optimisation levels, and other compiler switches. I wish I got the chance to do more with it, and provide him with detailed feedback he requested on the nature of the bugs but I never did :(
- wglb 13y agoMy favorite part is where his process found a non-trivial number of bugs in a research compiler that was proved correct.
- twic 13y agoWhich part is that? I had a look through the archives but couldn't spot a post which looked like that.
- wglb 13y agoHere is one paper that describes it: http://www.cs.utah.edu/~regehr/papers/pldi11-preprint.pdf http://www.cs.utah.edu/~regehr/papers/pldi11-preprint.pdf It is the CompCert compiler, which is formally verified. It looks as if the errors found were in the unverified portion. Those errors have been found and the verified surface has been expanded.
- steveklabnik 13y agoRegehr came to the Bay Area Rust Meetup a few days ago and talked to us about all this: https://air.mozilla.org/rust-meetup-may-2014/ https://air.mozilla.org/rust-meetup-may-2014/