You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/05/21 15:09:33 UTC
[GitHub] [trafficserver] bryancall opened a new pull request #7868: Fixed ASAN issues with MMH test
bryancall opened a new pull request #7868:
URL: https://github.com/apache/trafficserver/pull/7868
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt commented on a change in pull request #7868: Fixed ASAN issues with MMH test
Posted by GitBox <gi...@apache.org>.
bneradt commented on a change in pull request #7868:
URL: https://github.com/apache/trafficserver/pull/7868#discussion_r637038272
##########
File path: 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 + 4);
Review comment:
Makes sense. What do you think of using `sizeof(int32_t)` instead of `4`? It would make the intention more explicit.
`unsigned char *s1 = (unsigned char *)ats_malloc(l + sizeof(int32_t));`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bryancall merged pull request #7868: Fixed ASAN issues with MMH test
Posted by GitBox <gi...@apache.org>.
bryancall merged pull request #7868:
URL: https://github.com/apache/trafficserver/pull/7868
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bryancall commented on a change in pull request #7868: Fixed ASAN issues with MMH test
Posted by GitBox <gi...@apache.org>.
bryancall commented on a change in pull request #7868:
URL: https://github.com/apache/trafficserver/pull/7868#discussion_r637098613
##########
File path: 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 + 4);
Review comment:
I made a change to use sizeof(uint32_t)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] randall commented on a change in pull request #7868: Fixed ASAN issues with MMH test
Posted by GitBox <gi...@apache.org>.
randall commented on a change in pull request #7868:
URL: https://github.com/apache/trafficserver/pull/7868#discussion_r637247024
##########
File path: 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;
Review comment:
should the c-style casts be static_casts?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org