You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Jim Apple (Code Review)" <ge...@cloudera.org> on 2018/11/03 00:05:07 UTC

[Impala-ASF-CR] IMPALA-5031: Make UBSAN-friendly arithmetic generic

Hello Tim Armstrong, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/11810

to look at the new patch set (#2).

Change subject: IMPALA-5031: Make UBSAN-friendly arithmetic generic
......................................................................

IMPALA-5031: Make UBSAN-friendly arithmetic generic

ArithmeticUtil::AsUnsigned() makes it possible to do arithmetic on
signed integers in a way that does not invoke undefined behavior, but
it only works on integers. This patch adds ArithmeticUtil::Compute(),
which dispatches (at compile time) to the normal arithmetic evaluation
method if the type of the values is a floating point type, but uses
AsUnsigned() if the type of the values is an integral type.

Change-Id: I73bec71e59c5a921003d0ebca52a1d4e49bbef66
---
M be/src/exprs/expr-test.cc
M be/src/util/arithmetic-util.h
2 files changed, 54 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/10/11810/2
-- 
To view, visit http://gerrit.cloudera.org:8080/11810
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I73bec71e59c5a921003d0ebca52a1d4e49bbef66
Gerrit-Change-Number: 11810
Gerrit-PatchSet: 2
Gerrit-Owner: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>