Dan Hecht has posted comments on this change. Change subject: Add a build flag for the undefined behavior sanitizer, aka "ubsan". ......................................................................
Patch Set 3: (1 comment) http://gerrit.cloudera.org:8080/#/c/5082/3/be/src/exprs/bit-byte-functions-ir.cc File be/src/exprs/bit-byte-functions-ir.cc: PS3, Line 152: rotate_left > Partly it is a matter or taste. why do we have to handle int128? Our biggest int type is 64-bits. Is there a different place in this patch that requires 128 bit? also, can't we just use static_cast since there is a valid arithmetic conversion between signed/unsigned (one direction might be implementation defined, but it defined: https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html#Integers-implementation)? if we don't have to deal with 128 bit, how about just something like below? typedef make_unsigned<T>::type UT; UT uv = static_cast<UT>(v); ... do unsigned bit arthmetic on "uv" ... return static_cast<T>(result); -- To view, visit http://gerrit.cloudera.org:8080/5082 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I88c7234bd7c5eb7404490a0913d90470c10835e7 Gerrit-PatchSet: 3 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Jim Apple <[email protected]> Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Jim Apple <[email protected]> Gerrit-Reviewer: Marcel Kornacker <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-HasComments: Yes
