Dimitris Tsirogiannis has posted comments on this change. Change subject: IMPALA-3494: Fix Thrift TMemoryBuffer overflow ......................................................................
Patch Set 1: (3 comments) Is it possible to add a test case in Thrift? http://gerrit.cloudera.org:8080/#/c/3149/1/source/thrift/thrift-0.9.0-patches/0005-IMPALA-3494-fix-Thrift-TMemoryBuffer-overflow.patch File source/thrift/thrift-0.9.0-patches/0005-IMPALA-3494-fix-Thrift-TMemoryBuffer-overflow.patch: Line 9: > > *I think* I think you're right. Line 10: TMemoryBuffer reached 2 GB, unable to expand > no, this function will be called frequently in a single serialization. the Let me explain what I mean with this comment. The error message indicates that TMemoryBuffer reached 2GB. What I am saying is that this exception can be thrown even if TMemoryBuffer is less than that because the check considers the new_size not the bufferSize_ (which is the actual size of the buffer). Line 22: bufferSize_ = new_size; : : - ptrdiff_t offset = (uint8_t*)new_buffer - buffer_; : - buffer_ += offset; : - rBase_ += offset; : - rBound_ += offset; : - wBase_ += offset; : - wBound_ = buffer_ + bufferSize_; > I think this prevent some memory alignment issue. That's fine, I was just wondering where did this come from. -- To view, visit http://gerrit.cloudera.org:8080/3149 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I91086ed9d0b4f95b5532de67fe35b46b748ad16c Gerrit-PatchSet: 1 Gerrit-Project: Toolchain Gerrit-Branch: master Gerrit-Owner: Huaisi Xu <[email protected]> Gerrit-Reviewer: Dimitris Tsirogiannis <[email protected]> Gerrit-Reviewer: Huaisi Xu <[email protected]> Gerrit-HasComments: Yes
