[trafficserver] branch master updated: Fixed some spelling mistakes in comments (#7869)

2021-05-21 Thread bcall
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new c93e347  Fixed some spelling mistakes in comments (#7869)
c93e347 is described below

commit c93e34765d530c6c27b9adf362c58562fdacbc66
Author: Bryan Call 
AuthorDate: Fri May 21 16:03:22 2021 -0700

Fixed some spelling mistakes in comments (#7869)
---
 proxy/hdrs/HTTP.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/proxy/hdrs/HTTP.h b/proxy/hdrs/HTTP.h
index b344f77..88f2854 100644
--- a/proxy/hdrs/HTTP.h
+++ b/proxy/hdrs/HTTP.h
@@ -102,7 +102,7 @@ enum HTTPWarningCode {
   HTTP_WARNING_CODE_MISC_WARNING   = 199
 };
 
-/* squild log codes
+/* squid log codes
There is code (e.g. logstats) that depends on these errors coming at the 
end of this enum */
 enum SquidLogCode {
   SQUID_LOG_EMPTY = '0',
@@ -160,13 +160,13 @@ enum SquidLogCode {
   SQUID_LOG_ERR_UNKNOWN   = 'Z'
 };
 
-// squild log subcodes
+// squid log subcodes
 enum SquidSubcode {
   SQUID_SUBCODE_EMPTY = '0',
   SQUID_SUBCODE_NUM_REDIRECTIONS_EXCEEDED = '1',
 };
 
-/* squid hieratchy codes */
+/* squid hierarchy codes */
 enum SquidHierarchyCode {
   SQUID_HIER_EMPTY   = '0',
   SQUID_HIER_NONE= '1',


[trafficserver] branch master updated: Fixed ASAN issues with MMH test (#7868)

2021-05-21 Thread bcall
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new c7f3918  Fixed ASAN issues with MMH test (#7868)
c7f3918 is described below

commit c7f391845d8910e4e3a7248641945b5f81e73d04
Author: Bryan Call 
AuthorDate: Fri May 21 16:01:56 2021 -0700

Fixed ASAN issues with MMH test (#7868)
---
 src/tscore/unit_tests/test_MMH.cc | 18 +-
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/tscore/unit_tests/test_MMH.cc 
b/src/tscore/unit_tests/test_MMH.cc
index cf53935..f8cf3aa 100644
--- a/src/tscore/unit_tests/test_MMH.cc
+++ b/src/tscore/unit_tests/test_MMH.cc
@@ -83,15 +83,18 @@ TEST_CASE("MMH", "[libts][MMH]")
   printf("** collision %d\n", xy);
   }
 
-  unsigned char *s  = (unsigned char *)MMH_x;
-  int l = sizeof(MMH_x);
-  unsigned char *s1 = (unsigned char *)ats_malloc(l + 3);
+  unsigned char *s   = (unsigned char *)MMH_x;
+  int l  = sizeof(MMH_x);
+  unsigned char *s1  = (unsigned char *)ats_malloc(l + sizeof(uint32_t));
+  unsigned char *free_s1 = s1;
   s1 += 1;
   memcpy(s1, s, l);
-  unsigned char *s2 = (unsigned char *)ats_malloc(l + 3);
+  unsigned char *s2  = (unsigned char *)ats_malloc(l + sizeof(uint32_t));
+  unsigned char *free_s2 = s2;
   s2 += 2;
   memcpy(s2, s, l);
-  unsigned char *s3 = (unsigned char *)ats_malloc(l + 3);
+  unsigned char *s3  = (unsigned char *)ats_malloc(l + sizeof(uint32_t));
+  unsigned char *free_s3 = s3;
   s3 += 3;
   memcpy(s3, s, l);
 
@@ -136,4 +139,9 @@ TEST_CASE("MMH", "[libts][MMH]")
 if (!(z % 7))
   printf("\n");
   }
+  printf("\n");
+
+  ats_free(free_s1);
+  ats_free(free_s2);
+  ats_free(free_s3);
 }