Jim Apple 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
> what's wrong with reinterpret_cast? i find this code hard to follow.
Partly it is a matter or taste.

In this case, it actually gets uglier: because we don't know what T is, we have 
to std::make_unsigned, which doesn't work for __int128, so we have to write an 
overload if this function is called with that type.

It's also easy to accidentally reinterpret_cast<uint32_t *> a signed 64-bit 
integer when you actually meant to reinterpret_cast<uint64_t *>.

This method encapsulates some of that complexity. The results in this file are 
not as clean as the results at some other places in this patch, I would argue.


-- 
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

Reply via email to