impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Apple (Code Review)" <>
Subject [Impala-ASF-CR] Add a build flag for the undefined behavior sanitizer, aka "ubsan".
Date Sun, 27 Nov 2016 01:59:06 GMT
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)
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

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
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I88c7234bd7c5eb7404490a0913d90470c10835e7
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Jim Apple <>
Gerrit-Reviewer: Dan Hecht <>
Gerrit-Reviewer: Jim Apple <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message