impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Hecht (Code Review)" <>
Subject [Impala-ASF-CR] Add a build flag for the undefined behavior sanitizer, aka "ubsan".
Date Fri, 16 Dec 2016 21:16:34 GMT
Dan Hecht has posted comments on this change.

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

Patch Set 2:

> > If they're relying on twos-complement we could just cast to
 > > unsigned for the bit-manipulation, right?
 > > > Are any of these overflows legitimate use of signed overflows?
 > > > Assuming not, shouldn't we just fix the code that can lead to
 > > > signed overflows? Otherwise, while the behavior would become
 > > > defined, it's still not correct.
 > >
 > > What is your definition of a legitimate use of a signed overflow?
 > >
 > > Several are intentional and demonstrate an understanding of two's
 > > complement arithmetic.
 > Yes, but let me try to rephrase my last question to Dan:
 > If an Impala user adds 1 to the maximum signed integer value,
 > should they expect that it will overflow to the minimum signed
 > integer value? If so, presumably we should have a test for that.

Most of these overflows are not related to user values though, are they?  I would expect most
of these overflows to be on internal state.  

I think we should just look at them (or a representative sample) and see what makes sense.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I88c7234bd7c5eb7404490a0913d90470c10835e7
Gerrit-PatchSet: 2
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: No

View raw message