Jim Apple has posted comments on this change.

Change subject: Add a build flag for the undefined behavior sanitizer, aka 
"ubsan".
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/5082/1/be/CMakeLists.txt
File be/CMakeLists.txt:

Line 40: #  -fwrapv: force signed integer arithmetic operations to wrap
> Mostly yes, although we don't use unsigned ints in many places in the codeb
Tim, if I understand you correctly, your POV is that:

A. Our code should not execute instructions that cause int overflow, usually.

B. -fwrapv may slow down the code.

C. The -fwrapv status should be the same in codegenned code paths and 
non-codegenned code paths.

My POV is that:

1. We should care a great deal about preventing UB because the bugs it causes 
can be disastrous (taking both branches of a conditional) and hard to repro.

Actually, that's mostly it; just #1. If I can remove any overflows from our 
testsuite using UBSAN and show -fwrapv does not hurt our benchmarks and get 
codegenned code to use -fwrap just like non-codegenned code can with just this 
flag, wold you be OK with using -fwrapv?


-- 
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: 1
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: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to