You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2016/11/02 06:27:25 UTC

[1/2] mesos git commit: Added MESOS-6527 to CHANGELOG for 1.1.0.

Repository: mesos
Updated Branches:
  refs/heads/1.1.x 01f119bdf -> eaec806ad


Added MESOS-6527 to CHANGELOG for 1.1.0.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/4f655fd9
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/4f655fd9
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/4f655fd9

Branch: refs/heads/1.1.x
Commit: 4f655fd98c91b8e72dca4f4c7c5faf024a78d763
Parents: 01f119b
Author: Anand Mazumdar <an...@apache.org>
Authored: Tue Nov 1 21:36:29 2016 -0700
Committer: Anand Mazumdar <an...@apache.org>
Committed: Tue Nov 1 23:27:03 2016 -0700

----------------------------------------------------------------------
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4f655fd9/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 6cfa419..6b1e6b6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -222,6 +222,7 @@ All Issues:
   * [MESOS-6483] - Check failure when a 1.1 master marking a 0.28 agent as unreachable.
   * [MESOS-6497] - Java Scheduler Adapter does not surface MasterInfo.
   * [MESOS-6502] - _version uses incorrect MESOS_{MAJOR,MINOR,PATCH}_VERSION in libmesos java binding.
+  * [MESOS-6527] - Memory leak in the libprocess request decoder.
 
 ** Documentation
   * [MESOS-5221] - Add Documentation for Nvidia GPU support.


[2/2] mesos git commit: Fixed memory leak in request/response decoders.

Posted by an...@apache.org.
Fixed memory leak in request/response decoders.

The leak can happen in cases where a client disconnects while the
request/response is in progress.

Review: https://reviews.apache.org/r/53361/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/eaec806a
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/eaec806a
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/eaec806a

Branch: refs/heads/1.1.x
Commit: eaec806adefa1206c242e0409c6022a3bc115f6d
Parents: 4f655fd
Author: Anand Mazumdar <an...@apache.org>
Authored: Tue Nov 1 21:32:55 2016 -0700
Committer: Anand Mazumdar <an...@apache.org>
Committed: Tue Nov 1 23:27:14 2016 -0700

----------------------------------------------------------------------
 3rdparty/libprocess/src/decoder.hpp | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/eaec806a/3rdparty/libprocess/src/decoder.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/decoder.hpp b/3rdparty/libprocess/src/decoder.hpp
index c79296b..76dca0b 100644
--- a/3rdparty/libprocess/src/decoder.hpp
+++ b/3rdparty/libprocess/src/decoder.hpp
@@ -60,6 +60,15 @@ public:
     parser.data = this;
   }
 
+  ~DataDecoder()
+  {
+    delete request;
+
+    foreach (http::Request* request, requests) {
+      delete request;
+    }
+  }
+
   std::deque<http::Request*> decode(const char* data, size_t length)
   {
     size_t parsed = http_parser_execute(&parser, &settings, data, length);
@@ -296,6 +305,15 @@ public:
     parser.data = this;
   }
 
+  ~ResponseDecoder()
+  {
+    delete response;
+
+    foreach (http::Response* response, responses) {
+      delete response;
+    }
+  }
+
   std::deque<http::Response*> decode(const char* data, size_t length)
   {
     size_t parsed = http_parser_execute(&parser, &settings, data, length);
@@ -507,6 +525,19 @@ public:
     parser.data = this;
   }
 
+  ~StreamingResponseDecoder()
+  {
+    delete response;
+
+    if (writer.isSome()) {
+      writer->fail("Decoder is being deleted");
+    }
+
+    foreach (http::Response* response, responses) {
+      delete response;
+    }
+  }
+
   std::deque<http::Response*> decode(const char* data, size_t length)
   {
     size_t parsed = http_parser_execute(&parser, &settings, data, length);