Tim Armstrong 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@65 PS1, Line 65: docs p > If we #include <string.h>, I agree, but I think cstring puts it in std::, n I'm pretty sure all real implementations put the standard libc functions into the global namespace regardless of which header variant you import. Honestly, this makes sense to me - it would be insane for a C++ program to redefine memcpy. But yeah, this is ok, just slightly inconsistent with the rest of the code base. http://gerrit.cloudera.org:8080/#/c/11406/2/be/src/exprs/operators-ir.cc File be/src/exprs/operators-ir.cc: http://gerrit.cloudera.org:8080/#/c/11406/2/be/src/exprs/operators-ir.cc@68 PS2, Line 68: // range of the type". However, Clang does not document its implementation-defined I'm ok with relying on clang's undocumented behaviour so long as we have a test case. I don't see a reason why they would change this going forward, given it's the simplest to implement and most compatible with GCC. -- 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 <jbapple-imp...@apache.org> Gerrit-Reviewer: Dan Hecht <dhecht.apa...@gmail.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Jim Apple <jbapple-imp...@apache.org> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Comment-Date: Mon, 17 Sep 2018 16:32:26 +0000 Gerrit-HasComments: Yes