[cfe-dev] Way to disable sanitize checks locally
zapadinsky
zapadinsky at gmail.com
Thu Dec 13 22:40:30 PST 2012
> Are your hash function calculations using unsigned integers or signed
integers? Overflowing the former is well-defined, the latter is not.
That's why -fsanitize=undefined does not include
-fsanitize=unsigned-integer-overflow, see here:
>
Good code shouldn't overflow unsigned ints although it is well defined.
Unsigned overflow is a sign of error and should be found in debug process.
> A temporary kludge might be to push the hash function into a separate
> TU, build it without overflow checking (or just disable the overflow
> checks that are intentional).
For now it is an only option to accumulate all bad code in separate TU.
Wonder what will I do if I find a dirty code in templates which can't be
sorted off the headers.
--
View this message in context: http://clang-developers.42468.n3.nabble.com/Way-to-disable-sanitize-checks-locally-tp4028958p4028983.html
Sent from the Clang Developers mailing list archive at Nabble.com.
More information about the cfe-dev
mailing list