Jim Apple has uploaded this change for review. ( http://gerrit.cloudera.org:8080/11810
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, 47 insertions(+), 3 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/10/11810/1 -- 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: newchange Gerrit-Change-Id: I73bec71e59c5a921003d0ebca52a1d4e49bbef66 Gerrit-Change-Number: 11810 Gerrit-PatchSet: 1 Gerrit-Owner: Jim Apple <[email protected]>
