impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Hecht (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] Add a build flag for the undefined behavior sanitizer, aka "ubsan".
Date Mon, 09 Jan 2017 23:50:47 GMT
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 <jbapple-impala@apache.org>
Gerrit-Reviewer: Dan Hecht <dhecht@cloudera.com>
Gerrit-Reviewer: Jim Apple <jbapple-impala@apache.org>
Gerrit-Reviewer: Marcel Kornacker <marcel@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message