Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions ci/asan_leak_suppression/regression.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ leak:RegressionTest_PARENTSELECTION
leak:ParentConfig::reconfigure
leak:RegressionTest_SDK_API_TSHttpConnectIntercept
leak:RegressionTest_SDK_API_TSHttpConnectServerIntercept
leak:make_log_host
leak:ReRegressionSM::clone
leak:RegressionTest_ram_cache
leak:RegressionTest_HttpTransact_is_request_valid
Expand All @@ -11,9 +10,7 @@ leak:MakeTextLogFormat
leak:RegressionTest_HttpTransact_handle_trace_and_options_requests
leak:CRYPTO_malloc
leak:RegressionTest_SDK_API_TSMgmtGet
leak:RegressionTest_Cache_vol
leak:RegressionTest_SDK_API_TSCache
leak:RegressionTest_Hdrs
leak:RegressionTest_SDK_API_TSPortDescriptor
leak:RegressionTest_HostDBProcessor
leak:RegressionTest_DNS
Expand Down
12 changes: 3 additions & 9 deletions ci/asan_leak_suppression/unit_tests.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# leaks in test_X509HostnameValidator
leak:libcrypto.so.1.1
# for OpenSSL 1.0.2:
leak:CRYPTO_malloc
leak:CRYPTO_realloc
leak:ConsCell
# PR#10295
leak:pcre_jit_stack_alloc
# PR#10541
# marshal_hdr in test_http_hdr_print_and_copy_aux is intentionally
# not destroyed because it holds a reference to a stack-allocated
# TestRefCountObj whose free() override calls exit(1).
leak:test_http_hdr_print_and_copy_aux
Comment thread
bryancall marked this conversation as resolved.
20 changes: 20 additions & 0 deletions src/proxy/hdrs/unit_tests/test_Hdrs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ test_http_hdr_copy_over_aux(int testnum, const char *request, const char *respon

if (err == ParseResult::ERROR) {
std::printf("FAILED: (test #%d) parse error parsing request hdr\n", testnum);
req_hdr.destroy();
Comment thread
bryancall marked this conversation as resolved.
Outdated
return (0);
}
http_parser_clear(&parser);
Expand All @@ -229,6 +230,8 @@ test_http_hdr_copy_over_aux(int testnum, const char *request, const char *respon

if (err == ParseResult::ERROR) {
printf("FAILED: (test #%d) parse error parsing response hdr\n", testnum);
req_hdr.destroy();
resp_hdr.destroy();
return (0);
}

Expand Down Expand Up @@ -412,6 +415,7 @@ test_http_hdr_print_and_copy_aux(int testnum, const char *request, const char *r

if (err == ParseResult::ERROR) {
std::printf("FAILED: (test #%d) parse error parsing request hdr\n", testnum);
hdr.destroy();
return (0);
}

Expand All @@ -438,6 +442,9 @@ test_http_hdr_print_and_copy_aux(int testnum, const char *request, const char *r

if ((prt_ret != 1) || (cpy_ret != 1)) {
std::printf("FAILED: (test #%d) couldn't print req hdr or copy --- prt_ret=%d, cpy_ret=%d\n", testnum, prt_ret, cpy_ret);
hdr.destroy();
new_hdr.destroy();

Comment thread
bryancall marked this conversation as resolved.
Outdated
return (0);
}

Expand All @@ -449,6 +456,9 @@ test_http_hdr_print_and_copy_aux(int testnum, const char *request, const char *r
std::printf("TARGET :\n[%.*s]\n", static_cast<int>(strlen(request_tgt)), request_tgt);
std::printf("PRT_BUFF:\n[%.*s]\n", prt_bufindex, prt_buf);
std::printf("CPY_BUFF:\n[%.*s]\n", cpy_bufindex, cpy_buf);
hdr.destroy();
new_hdr.destroy();

return (0);
}

Expand All @@ -459,6 +469,9 @@ test_http_hdr_print_and_copy_aux(int testnum, const char *request, const char *r
std::printf("TARGET :\n[%.*s]\n", static_cast<int>(strlen(request_tgt)), request_tgt);
std::printf("PRT_BUFF:\n[%.*s]\n", prt_bufindex, prt_buf);
std::printf("CPY_BUFF:\n[%.*s]\n", cpy_bufindex, cpy_buf);
hdr.destroy();
new_hdr.destroy();

return (0);
}

Expand All @@ -483,6 +496,7 @@ test_http_hdr_print_and_copy_aux(int testnum, const char *request, const char *r

if (err == ParseResult::ERROR) {
std::printf("FAILED: (test #%d) parse error parsing response hdr\n", testnum);
hdr.destroy();
return (0);
}

Expand All @@ -501,6 +515,8 @@ test_http_hdr_print_and_copy_aux(int testnum, const char *request, const char *r

if ((prt_ret != 1) || (cpy_ret != 1)) {
std::printf("FAILED: (test #%d) couldn't print rsp hdr or copy --- prt_ret=%d, cpy_ret=%d\n", testnum, prt_ret, cpy_ret);
hdr.destroy();
new_hdr.destroy();
return (0);
}

Expand All @@ -511,6 +527,8 @@ test_http_hdr_print_and_copy_aux(int testnum, const char *request, const char *r
std::printf("TARGET :\n[%.*s]\n", static_cast<int>(strlen(response_tgt)), response_tgt);
std::printf("PRT_BUFF:\n[%.*s]\n", prt_bufindex, prt_buf);
std::printf("CPY_BUFF:\n[%.*s]\n", cpy_bufindex, cpy_buf);
hdr.destroy();
new_hdr.destroy();
return (0);
}

Expand All @@ -521,6 +539,8 @@ test_http_hdr_print_and_copy_aux(int testnum, const char *request, const char *r
std::printf("TARGET :\n[%.*s]\n", static_cast<int>(strlen(response_tgt)), response_tgt);
std::printf("PRT_BUFF:\n[%.*s]\n", prt_bufindex, prt_buf);
std::printf("CPY_BUFF:\n[%.*s]\n", cpy_bufindex, cpy_buf);
hdr.destroy();
new_hdr.destroy();
return (0);
}

Expand Down