GitHub user asuhan opened a pull request:
https://github.com/apache/thrift/pull/1325
THRIFT-3821: Check for overflow on buffer resize in TMemoryBuffer
Going over 2 GB is quite possible when using Thrift for serialization. We
can detect the condition and throw an exception.
You can
Github user asuhan closed the pull request at:
https://github.com/apache/thrift/pull/1325
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is
GitHub user asuhan opened a pull request:
https://github.com/apache/thrift/pull/1326
THRIFT-3821
Going over 2 GB is quite possible when using Thrift for serialization. We
can detect the condition and throw an exception.
You can merge this pull request into a Git repository by
Github user asuhan commented on the issue:
https://github.com/apache/thrift/pull/1326
Thanks for the review, I'll address both. It's my preference to squash the
commits as well, sounds like I've misinterpreted
https://thrift.apache.org/docs/HowToContribute (it says
Github user asuhan commented on the issue:
https://github.com/apache/thrift/pull/1326
I've disabled the test for Windows since allocating 1GB on 32-bit is likely
to fail with `bad_alloc`.
Test failure looks unrelated, also got a clean run before:
https://travis-ci.org/a
Github user asuhan commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1326#discussion_r132612265
--- Diff: lib/cpp/src/thrift/transport/TBufferTransports.cpp ---
@@ -361,9 +361,13 @@ void TMemoryBuffer::ensureCanWrite(uint32_t len
Github user asuhan commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1326#discussion_r132612556
--- Diff: lib/cpp/test/TMemoryBufferTest.cpp ---
@@ -117,4 +117,17 @@ BOOST_AUTO_TEST_CASE(test_exceptions) {
BOOST_CHECK_NO_THROW(buf2.write((const
Github user asuhan commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1326#discussion_r132613779
--- Diff: lib/cpp/src/thrift/transport/TBufferTransports.cpp ---
@@ -361,9 +361,13 @@ void TMemoryBuffer::ensureCanWrite(uint32_t len
Github user asuhan commented on the issue:
https://github.com/apache/thrift/pull/1326
Are there any additional changes I should make to this pull request? As
I've said in the inline comment, I believe comparing to
`std::numeric_limits::max()` is actually consistent with wha