You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/05/09 10:30:50 UTC

[trafficserver] branch 7.1.x updated (3001e31 -> efc6e1d)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a change to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


    from 3001e31  7.1.x runroot parsing fix
     new 7cda414  Parent Selection -- Balance treatment of primary and secondary parents in ProcessParents().
     new 48e2fdd  Coverity ID 1390803: Fixes unreachable code in OCSP
     new 34199fb  Fixes uninitialized argument value use in HttpTransact::issue_revalidate
     new 4f2aa69  Fixed off-by-one error in select_best_srv.
     new 4a20742  Option to enable stand-alone Leak Sanitizer
     new efc6e1d  Corrects marshaling of source ip and port

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configure.ac                      | 18 ++++++++++++++++++
 iocore/hostdb/P_HostDBProcessor.h |  2 +-
 iocore/net/OCSPStapling.cc        |  2 +-
 proxy/ParentSelection.cc          |  9 +++++++--
 proxy/http/HttpTransact.cc        |  5 +++--
 proxy/logging/LogAccessHttp.cc    |  4 ++--
 6 files changed, 32 insertions(+), 8 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
zwoop@apache.org.

[trafficserver] 05/06: Option to enable stand-alone Leak Sanitizer

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 4a20742db975a72aebaeade7b369c1a567dfb716
Author: Gancho Tenev <ga...@apache.org>
AuthorDate: Wed May 2 19:29:34 2018 -0700

    Option to enable stand-alone Leak Sanitizer
    
    If leak detection is needed without the Address Sanitizer slowdown.
    
    (cherry picked from commit 09ea78fa6c55b793c46c616d1365ba68b0f18374)
---
 configure.ac | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/configure.ac b/configure.ac
index 7dd6c56..bf44a2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -205,6 +205,15 @@ AC_ARG_ENABLE([asan],
 )
 AC_MSG_RESULT([$enable_asan])
 
+# Enable LSAN in stand-alone mode for the builds
+AC_MSG_CHECKING([whether to enable lsan])
+AC_ARG_ENABLE([lsan],
+  [AS_HELP_STRING([--enable-lsan],[enable stand-alone Leak Sanitizer])],
+  [],
+  [enable_lsan=no]
+)
+AC_MSG_RESULT([$enable_lsan])
+
 # Enable TSAN for the builds
 AC_MSG_CHECKING([whether to enable tsan])
 AC_ARG_ENABLE([tsan],
@@ -945,6 +954,15 @@ if test "x${enable_asan}" = "xyes"; then
   TS_ADDTO(AM_CXXFLAGS, [-fno-omit-frame-pointer -fsanitize=address])
 fi
 
+# Flags for LSAN stand-alone mode
+if test "x${enable_lsan}" = "xyes"; then
+  if test "x${enable_asan}" = "xyes"; then
+    AC_ERROR([ASAN already specified, --enable-lsan is meant only for lsan stand-alone mode])
+  fi
+  TS_ADDTO(AM_CFLAGS, [-fno-omit-frame-pointer -fsanitize=leak])
+  TS_ADDTO(AM_CXXFLAGS, [-fno-omit-frame-pointer -fsanitize=leak])
+fi
+
 # Flags for TSAN
 if test "x${enable_tsan}" = "xyes"; then
   TS_ADDTO(AM_CFLAGS, [-fsanitize=thread])

-- 
To stop receiving notification emails like this one, please contact
zwoop@apache.org.

[trafficserver] 01/06: Parent Selection -- Balance treatment of primary and secondary parents in ProcessParents().

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 7cda414454f08103b6747ea29e1df9dfee3e64d8
Author: Peter Chou <pb...@labs.att.com>
AuthorDate: Wed May 2 22:20:59 2018 -0700

    Parent Selection -- Balance treatment of primary and secondary parents in ProcessParents().
    
    If an error is detected in ParentRecord::ProcessParents(), then the interim parent
    memory is freed. This was being done only for primary parents but not for secondary
    parents.
    
    (cherry picked from commit d013fc94530458027f78c3d4fea12c4a470ee06c)
---
 proxy/ParentSelection.cc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/proxy/ParentSelection.cc b/proxy/ParentSelection.cc
index 749bc40..27be401 100644
--- a/proxy/ParentSelection.cc
+++ b/proxy/ParentSelection.cc
@@ -474,8 +474,13 @@ ParentRecord::ProcessParents(char *val, bool isPrimary)
   return nullptr;
 
 MERROR:
-  ats_free(parents);
-  parents = nullptr;
+  if (isPrimary) {
+    ats_free(parents);
+    parents = nullptr;
+  } else {
+    ats_free(secondary_parents);
+    secondary_parents = nullptr;
+  }
 
   return errPtr;
 }

-- 
To stop receiving notification emails like this one, please contact
zwoop@apache.org.

[trafficserver] 03/06: Fixes uninitialized argument value use in HttpTransact::issue_revalidate

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 34199fb784856a42814c8d20e562ef8b026a21dd
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Mon May 7 14:48:33 2018 +0100

    Fixes uninitialized argument value use in HttpTransact::issue_revalidate
    
    issue found by clang-analyzer
    
    (cherry picked from commit 7d5e0a1f03528d36b89f51387da18a652067004e)
---
 proxy/http/HttpTransact.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index bcd383b..2178b33 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -2360,8 +2360,9 @@ HttpTransact::issue_revalidate(State *s)
       // make this a conditional request
       int length;
       const char *str = c_resp->value_get(MIME_FIELD_LAST_MODIFIED, MIME_LEN_LAST_MODIFIED, &length);
-
-      s->hdr_info.server_request.value_set(MIME_FIELD_IF_MODIFIED_SINCE, MIME_LEN_IF_MODIFIED_SINCE, str, length);
+      if (str) {
+        s->hdr_info.server_request.value_set(MIME_FIELD_IF_MODIFIED_SINCE, MIME_LEN_IF_MODIFIED_SINCE, str, length);
+      }
       if (!s->cop_test_page)
         DUMP_HEADER("http_hdrs", &s->hdr_info.server_request, s->state_machine_id, "Proxy's Request (Conditionalized)");
     }

-- 
To stop receiving notification emails like this one, please contact
zwoop@apache.org.

[trafficserver] 04/06: Fixed off-by-one error in select_best_srv.

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 4f2aa690b313796f3069f78e56c6ec1392e79b28
Author: Chris Lemmons <al...@gmail.com>
AuthorDate: Tue May 8 15:54:42 2018 +0000

    Fixed off-by-one error in select_best_srv.
    
    This error may never actually occur, it was reported by clang-analyzer. This
    just ensures that in no case does the loop run one past the end of the array.
    
    (cherry picked from commit aa97de6162ac53f733c1e7a97fcb2350779d6ed8)
---
 iocore/hostdb/P_HostDBProcessor.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/hostdb/P_HostDBProcessor.h b/iocore/hostdb/P_HostDBProcessor.h
index a830b79..8e3bd77 100644
--- a/iocore/hostdb/P_HostDBProcessor.h
+++ b/iocore/hostdb/P_HostDBProcessor.h
@@ -373,7 +373,7 @@ HostDBRoundRobin::select_best_srv(char *target, InkRand *rand, ink_time_t now, i
     result = &info(current++ % len);
   } else {
     uint32_t xx = rand->random() % weight;
-    for (i = 0; i < len && xx >= infos[i]->data.srv.srv_weight; ++i)
+    for (i = 0; i < len - 1 && xx >= infos[i]->data.srv.srv_weight; ++i)
       xx -= infos[i]->data.srv.srv_weight;
 
     result = infos[i];

-- 
To stop receiving notification emails like this one, please contact
zwoop@apache.org.

[trafficserver] 06/06: Corrects marshaling of source ip and port

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit efc6e1d6bda6620e47456b14be263aeec95e553d
Author: Derek Dagit <de...@oath.com>
AuthorDate: Mon Apr 30 18:06:39 2018 -0500

    Corrects marshaling of source ip and port
    
    (cherry picked from commit 01201739e252f84e7c8a7c62c0ee31feb0def616)
---
 proxy/logging/LogAccessHttp.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxy/logging/LogAccessHttp.cc b/proxy/logging/LogAccessHttp.cc
index bb7381a..404f65b 100644
--- a/proxy/logging/LogAccessHttp.cc
+++ b/proxy/logging/LogAccessHttp.cc
@@ -1058,14 +1058,14 @@ LogAccessHttp::marshal_proxy_req_server_name(char *buf)
 int
 LogAccessHttp::marshal_proxy_req_server_ip(char *buf)
 {
-  return marshal_ip(buf, m_http_sm->t_state.current.server != nullptr ? &m_http_sm->t_state.current.server->dst_addr.sa : nullptr);
+  return marshal_ip(buf, m_http_sm->t_state.current.server != nullptr ? &m_http_sm->t_state.current.server->src_addr.sa : nullptr);
 }
 
 int
 LogAccessHttp::marshal_proxy_req_server_port(char *buf)
 {
   if (buf) {
-    uint16_t port = ntohs(m_http_sm->t_state.current.server != nullptr ? m_http_sm->t_state.current.server->dst_addr.port() : 0);
+    uint16_t port = ntohs(m_http_sm->t_state.current.server != nullptr ? m_http_sm->t_state.current.server->src_addr.port() : 0);
     marshal_int(buf, port);
   }
   return INK_MIN_ALIGN;

-- 
To stop receiving notification emails like this one, please contact
zwoop@apache.org.

[trafficserver] 02/06: Coverity ID 1390803: Fixes unreachable code in OCSP

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 48e2fdd37bc924e211bc7a9a6bd7326c19658a07
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Fri May 4 09:29:08 2018 -0700

    Coverity ID 1390803: Fixes unreachable code in OCSP
    
    (cherry picked from commit df8e3ca301d6bc02c5c4114ef018e648b724cead)
---
 iocore/net/OCSPStapling.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/net/OCSPStapling.cc b/iocore/net/OCSPStapling.cc
index b5b7e46..3259b24 100644
--- a/iocore/net/OCSPStapling.cc
+++ b/iocore/net/OCSPStapling.cc
@@ -111,8 +111,8 @@ stapling_get_issuer(SSL_CTX *ssl_ctx, X509 *x)
       return issuer;
 #else
       X509_up_ref(issuer);
-#endif
       goto end;
+#endif
     }
   }
 

-- 
To stop receiving notification emails like this one, please contact
zwoop@apache.org.