AdityaSinha149 wrote:

> The new test triggers leak sanitizer error in address sanitizer build. Can 
> you please take a look?
> 
> ```
> $ build/tools/clang/unittests/Interpreter/ClangReplInterpreterTests   
> --gtest_filter='DeviceOffloadBuilderTest.*'
> ...
> ==3171161==ERROR: LeakSanitizer: detected memory leaks
> 
> Direct leak of 33 byte(s) in 1 object(s) allocated from:
>     #0 0x5564dc3e3b48 in malloc 
> (<path>/llvm-project/build/tools/clang/unittests/Interpreter/ClangReplInterpreterTests+0x124ab48)
>  (BuildId: 449817412f3725a8df66baf04ae5a9e987fed2c3)
>     #1 0x5564e1f9d94f in operator new(unsigned long, (anonymous 
> namespace)::NamedBufferAlloc const&) 
> <path>/llvm-project/llvm/lib/Support/MemoryBuffer.cpp:87:27
>     #2 0x5564e1f9d5df in llvm::MemoryBuffer::getMemBuffer(llvm::StringRef, 
> llvm::StringRef, bool) 
> <path>/llvm-project/llvm/lib/Support/MemoryBuffer.cpp:130:15
>     #3 0x5564e3c5683b in CreateCI 
> <path>/llvm-project/clang/lib/Interpreter/Interpreter.cpp:188:28
>     #4 0x5564e3c5683b in 
> clang::IncrementalCompilerBuilder::create(std::__cxx11::basic_string<char, 
> std::char_traits<char>, std::allocator<char>>, std::vector<char const*, 
> std::allocator<char const*>>&) 
> <path>/llvm-project/clang/lib/Interpreter/Interpreter.cpp:382:10
>     #5 0x5564e3c5aa93 in 
> clang::IncrementalCompilerBuilder::createOffload(bool, clang::OffloadType) 
> <path>/llvm-project/clang/lib/Interpreter/Interpreter.cpp:443:38
>     #6 0x5564e3c5aff1 in 
> clang::IncrementalCompilerBuilder::CreateHost(clang::OffloadType) 
> <path>/llvm-project/clang/lib/Interpreter/Interpreter.cpp:453:38
>     #7 0x5564dc4925d0 in (anonymous 
> namespace)::DeviceOffloadBuilderTest_HIPDeviceDefaultsToO3_Test::TestBody() 
> <path>/llvm-project/clang/unittests/Interpreter/DeviceOffloadTest.cpp:152:20
>     #8 0x5564e21e51be in HandleExceptionsInMethodIfSupported<testing::Test, 
> void> <path>/llvm-project/third-party/unittest/googletest/src/gtest.cc
>     #9 0x5564e21e51be in testing::Test::Run() 
> <path>/llvm-project/third-party/unittest/googletest/src/gtest.cc:2688:5
>     #10 0x5564e21e84da in testing::TestInfo::Run() 
> <path>/llvm-project/third-party/unittest/googletest/src/gtest.cc:2837:11
>     #11 0x5564e21ea58d in testing::TestSuite::Run() 
> <path>/llvm-project/third-party/unittest/googletest/src/gtest.cc:3016:30
>     #12 0x5564e221494a in testing::internal::UnitTestImpl::RunAllTests() 
> <path>/llvm-project/third-party/unittest/googletest/src/gtest.cc:5921:44
>     #13 0x5564e2212cd4 in 
> HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> 
> <path>/llvm-project/third-party/unittest/googletest/src/gtest.cc
>     #14 0x5564e2212cd4 in testing::UnitTest::Run() 
> <path>/llvm-project/third-party/unittest/googletest/src/gtest.cc:5485:10
>     #15 0x5564e2195acd in RUN_ALL_TESTS 
> <path>/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2317:73
>     #16 0x5564e2195acd in main 
> <path>/llvm-project/third-party/unittest/UnitTestMain/TestMain.cpp:55:10
>     #17 0x7f9324232fb9 in __libc_start_call_main 
> csu/../sysdeps/nptl/libc_start_call_main.h:59:16
> ```

Thanks for pointing out this issue, I will look into this and provide a fix PR 
asap.

https://github.com/llvm/llvm-project/pull/242296
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to