Tim Armstrong has posted comments on this change.

Change subject: IMPALA-3282: TBinaryProtocol buffers consume unbounded memory
......................................................................


Patch Set 3:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/3201/3/source/thrift/thrift-0.9.0-patches/0008-IMPALA-3582-string-buffer-memory.patch
File 
source/thrift/thrift-0.9.0-patches/0008-IMPALA-3582-string-buffer-memory.patch:

Line 3: +++ ./thrift-0.9.0-p4-wip/lib/cpp/src/thrift/protocol/TBinaryProtocol.h 
2016-05-24 13:31:18.520679315 -0700
> I am not sure but does this diff works?
Yeah the prefix is automatically stripped off by "patch -p1" or "patch -p2", so 
it applies fine. I'll clean up the patch a little bit.


Line 66: +  str.resize((uint32_t)size);
> this can throw bad_alloc I think
The previous version of the code also threw bad_alloc() (explicitly, and 
string::assign() can also throw bad_alloc()). It's not ideal but I looked and 
propagating a return status is a very large change.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I58bdc899e604bde2f5b2d5360f79537ce25715ee
Gerrit-PatchSet: 3
Gerrit-Project: Toolchain
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Dan Hecht <[email protected]>
Gerrit-Reviewer: Dimitris Tsirogiannis <[email protected]>
Gerrit-Reviewer: Huaisi Xu <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: Yes

Reply via email to