[cfe-dev] [libc++] debug mode

M.E. O'Neill oneill at cs.hmc.edu
Mon Sep 19 00:56:59 PDT 2011


Ruben Van Boxem wrote:
> I don't like the idea of probabilistic odds, especially in hugely iterated and containered program this would make debugging useless (especially for long-running server-like programs that would need to be debugged)

You don't like an undefined-behavior detection scheme that has a 1 in 2**64 chance of not detecting erroneous use?

So you're saying that 99.99999999999999999457899% reliability isn't good enough?  You realize that at one operation per nanosecond, that's an expected time to failure-to-detect-undefined-behavior of about 585 years?  Somehow, I doubt anything else in your system behaves with that level of reliability.

Put another way, if each time we *do* detect undefined behavior, that's a distinct bug we need to fix, we can expect to find 18446744073709551615 bugs before we get one that we fail to find.  If we were to task every human being who has ever lived (106.5 billion people) with fixing those bugs, that gives each of them 173 million bugs to fix.

I'd say if your code is *that* buggy, you have other worries.

    M.E.O.

P.S. Now I'll be struck by lightning.  Twice.  In unrelated incidents.  And gored by a stray bull.








More information about the cfe-dev mailing list