Anonymous Coward #159 has posted comments on this change. Change subject: IMPALA-3018: Don't return NULL on zero length allocations. ......................................................................
Patch Set 3: (1 comment) http://gerrit.cloudera.org:8080/#/c/3601/3/be/src/udf/udf.cc File be/src/udf/udf.cc: Line 289: uint8_t* buffer = impl_->pool_->Allocate(byte_size); Hi, Are you sure this is going to work correctly ? I can see that Allocate ends up dong malloc(byte_size) and according to the specification for malloc(0): "the behavior is implementation-defined: the value returned shall be either a null pointer or a unique pointer" http://pubs.opengroup.org/onlinepubs/009695399/functions/malloc.html Now maybe impala stdlib and compiler is reliable in that context. -- To view, visit http://gerrit.cloudera.org:8080/3601 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id8c3211f4d9417f44b8018ccc58ae182682693da Gerrit-PatchSet: 3 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Michael Ho <[email protected]> Gerrit-Reviewer: Anonymous Coward #159 Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Internal Jenkins Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Sailesh Mukil <[email protected]> Gerrit-HasComments: Yes
