Jim Apple has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/11406 )

Change subject: IMPALA-5031: undefined behavior: codegen signed overflow
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/11406/1/be/src/exprs/operators-ir.cc
File be/src/exprs/operators-ir.cc:

http://gerrit.cloudera.org:8080/#/c/11406/1/be/src/exprs/operators-ir.cc@56
PS1, Line 56: converted to a prvalue of another integer type. ... If the 
destination type is
> did you verify that it's happening? what about in debug builds?
I can see that it's happening in release. In debug, this still generates a few 
unnecessary IR loads/stores, but no actual calls to memcpy.

Good suggestion about the static cast. A static cast works correctly TO 
unsigned, but not FROM, I learned, so this new patchset still has one memcpy.


http://gerrit.cloudera.org:8080/#/c/11406/1/be/src/exprs/operators-ir.cc@65
PS1, Line 65: docs p
> the std:: doesn't seem necessary
If we #include <string.h>, I agree, but I think cstring puts it in std::, not 
::.

https://en.cppreference.com/w/cpp/string/byte/memcpy



--
To view, visit http://gerrit.cloudera.org:8080/11406
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I79ec3a5ed974709e5e47be6b074d39ee89461f7f
Gerrit-Change-Number: 11406
Gerrit-PatchSet: 2
Gerrit-Owner: Jim Apple <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jim Apple <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-Comment-Date: Sun, 16 Sep 2018 23:16:59 +0000
Gerrit-HasComments: Yes

Reply via email to