5 ms·
You really think the cost for C and C++ are similar or comparable enough to lump both languages in the same category? Have you looked at or reviewed CompCert C
by fizixer 9y ago
You really think the cost for C and C++ are similar or comparable enough to lump both languages in the same category? Have you looked at or reviewed CompCert C compiler (and a handful of other C compiler projects, as opposed to practically zero such projects for C++ that I know of)?
- pcwalton 9y agoFor both languages, the number of security-relevant issues in the wild caused by undefined behavior far exceeds the number of such issues caused by compiler bugs. Yes, C++ compilers are much harder to write, but the number of actual security problems caused by genuine C++ miscompilations is still a relative drop in the bucket.
- fizixer 9y agoEven if I buy what you said, it means the following: - C compiler correctness verification cost _is not_ out of proportion of its benefits, by virtue of the verification being very doable (and done already multiple times). In other words, low cost, low benefit. (though I seriously doubt your 'low benefit' claim and I think security, and guarding against undefined behavior, is easier to enforce through verified implementations, because it makes modifying compiler behavior more efficient, but let's stick to what you said). - C++ compiler correctness verification cost _is_ out of proportion (high cost, low benefit) - JS compiler/interpreter correctness verification cost is not out of proportion of its benefits, by virtue of existing JS implementations being very buggy. (high cost, high benefit). This still leaves your original comment inconsistent with what you just said.