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:26:33 UTC

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

Repository: mesos
Updated Branches:
  refs/heads/1.0.x 9e0f9505b -> 07a4a242d


Added MESOS-6527 to CHANGELOG for 1.0.2.


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

Branch: refs/heads/1.0.x
Commit: 9a218e3edf3d9fac0a83817d26ad689cf7d53f05
Parents: 9e0f950
Author: Anand Mazumdar <an...@apache.org>
Authored: Tue Nov 1 21:37:39 2016 -0700
Committer: Anand Mazumdar <an...@apache.org>
Committed: Tue Nov 1 23:26:02 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/9a218e3e/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index feea00c..afec49b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -31,6 +31,7 @@ All Issues:
     * [MESOS-6446] - WebUI redirect doesn't work with stats from /metric/snapshot.
     * [MESOS-6461] - Duplicate framework ids in /master/frameworks endpoint 'unregistered_frameworks'.
     * [MESOS-6502] - _version uses incorrect MESOS_{MAJOR,MINOR,PATCH}_VERSION in libmesos java binding.
+    * [MESOS-6527] - Memory leak in the libprocess request decoder.
 
 ** Improvement
     * [MESOS-6075] - Avoid libprocess functions in `mesos-containerizer launch`.


[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/07a4a242
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/07a4a242
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/07a4a242

Branch: refs/heads/1.0.x
Commit: 07a4a242d7e722840c63e9b0d6a444ad5e6b1ec3
Parents: 9a218e3
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:26:17 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/07a4a242/3rdparty/libprocess/src/decoder.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/decoder.hpp b/3rdparty/libprocess/src/decoder.hpp
index 47cfc0f..26b343f 100644
--- a/3rdparty/libprocess/src/decoder.hpp
+++ b/3rdparty/libprocess/src/decoder.hpp
@@ -62,6 +62,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);
@@ -339,6 +348,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);
@@ -575,6 +593,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);