masaori335 opened a new issue, #10539:
URL: https://github.com/apache/trafficserver/issues/10539

   Combination of LSan & MallocAllocator uncovered existing memory leaks of 
unit tests.
   
   ```
   ==22727==ERROR: LeakSanitizer: detected memory leaks
   
   Direct leak of 14336 byte(s) in 7 object(s) allocated from:
       #0 0x55e02bcdac9d in aligned_alloc 
(/workspace/proxy/hdrs/.libs/test_proxy_hdrs+0xcbc9d) (BuildId: 
7e145db0b261d0ac150935c6337987155a34438e)
       #1 0x55e02bd89cbc in MallocAllocator::alloc_void() 
/workspace/iocore/eventsystem/../../include/tscore/Allocator.h:141:13
       #2 0x55e02bd89cbc in thread_alloc(MallocAllocator&, ProxyAllocator&) 
/workspace/iocore/eventsystem/ProxyAllocator.cc:38:12
       #3 0x55e02bd710e5 in new_HdrHeap(int) 
/workspace/proxy/hdrs/HdrHeap.cc:114:35
       #4 0x55e02bd5546b in HTTPHdr::create(HTTPType, HTTPVersion, HdrHeap*) 
/workspace/proxy/hdrs/./HTTP.h:700:14
       #5 0x55e02bd5546b in (anonymous namespace)::test_http_hdr_null_char(int, 
char const*, char const*) /workspace/proxy/hdrs/unit_tests/test_Hdrs.cc:290:7
       #6 0x55e02bd5546b in C_A_T_C_H_T_E_S_T_4() 
/workspace/proxy/hdrs/unit_tests/test_Hdrs.cc:1191:16
       #7 0x55e02bcf4cfe in Catch::TestCase::invoke() const 
/workspace/lib/catch2/catch.hpp:14167:15
       #8 0x55e02bcf4cfe in Catch::RunContext::invokeActiveTestCase() 
/workspace/lib/catch2/catch.hpp:13027:27
       #9 0x55e02bcf4cfe in 
Catch::RunContext::runCurrentTest(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char>>&, 
std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char>>&) /
   workspace/lib/catch2/catch.hpp:13000:17
       #10 0x55e02bcf420e in Catch::RunContext::runTest(Catch::TestCase const&) 
/workspace/lib/catch2/catch.hpp:12761:13
       #11 0x55e02bcfa663 in Catch::(anonymous namespace)::TestGroup::execute() 
/workspace/lib/catch2/catch.hpp:13354:45
       #12 0x55e02bcfa663 in Catch::Session::runInternal() 
/workspace/lib/catch2/catch.hpp:13560:39
       #13 0x55e02bcf9358 in Catch::Session::run() 
/workspace/lib/catch2/catch.hpp:13516:24
       #14 0x55e02bd11f57 in int Catch::Session::run<char>(int, char const* 
const*) /workspace/lib/catch2/catch.hpp:13238:30
       #15 0x55e02bd11f57 in main 
/workspace/proxy/hdrs/unit_tests/unit_test_main.cc:41:33
       #16 0x7fc5fa127a8f  (/lib/x86_64-linux-gnu/libc.so.6+0x23a8f) (BuildId: 
bdb8aa3b1b60f9d43e1c70ba98158e05f765efdc)
   ```
   
   ```
   root@c69c6af45bca:/workspace# cat config.nice
   #! /bin/sh
   #
   # Created by configure
   
   CC="clang"; export CC
   CXX="clang++"; export CXX
   NM=""; export NM
   "./configure" \
   "--enable-experimental-plugins" \
   "--enable-example-plugins" \
   "--enable-expensive-tests" \
   "--prefix=/tmp/ats/" \
   "--enable-werror" \
   "--enable-ccache" \
   "--enable-lsan" \
   "--enable-malloc-allocator" \
   "CC=clang" \
   "CXX=clang++" \
   "$@"
   ```
   
   - [ ] iocore/cache/test_*
   - [ ] proxy/hdrs/test_proxy_hdrs
   - [ ] proxy/http2/test_libhttp2


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to