impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <>
Subject [Impala-ASF-CR] Add a build flag for the undefined behavior sanitizer, aka "ubsan".
Date Thu, 17 Nov 2016 00:23:51 GMT
Tim Armstrong has posted comments on this change.

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

Patch Set 1:

File be/src/exprs/

Line 157:     if (LIKELY(dst->ptr && src.ptr)) memcpy(dst->ptr, src.ptr, src.len);
Prefer explicit NULL checks.

I also don't believe this change is necessary and could mask other bugs. If src.ptr is NULL,
that means src.len is 0 (unless there's a bug), which means that dst->ptr should have been
set to NULL by the StringVal constructor.
File be/src/runtime/

PS1, Line 1684: accumulators::count(completion_times)
> accumulators::count(completion_times) can be zero, making mean and variance
Can you do an explicit comparison against 0 here?

Line 1701:       if (accumulators::count(rates)) {
And here
File be/src/runtime/

PS1, Line 164: len
> int buf[x] where x is a 0-length variable at run-time is UB
How about using a vector or string here instead to avoid the extra branch.
File bin/

Line 41: export PATH="${IMPALA_TOOLCHAIN}/llvm-${IMPALA_LLVM_VERSION}/bin:${PATH}"
It's a bit unfortunately there isn't a cleaner way to do this.

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