[PATCH] D102136: [NewPM] Add C bindings for new pass manager
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 17 13:35:35 PDT 2021
hctim added a comment.
Looks like this causes an ASan buildbot failure. I've left inline comments:
https://lab.llvm.org/buildbot/#/builders/5/builds/7712/
=================================================================
==88767==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 25 byte(s) in 1 object(s) allocated from:
#0 0x212ffc4 in strdup /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/asan/asan_interceptors.cpp:439:3
#1 0x2b8c0cf in LLVMGetDefaultTargetTriple /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Target/TargetMachineC.cpp:246:10
#2 0x21725ed in PassBuilderCTest::SetUp() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/unittests/Passes/PassBuilderBindingsTest.cpp:19:26
#3 0x34f7e88 in HandleExceptionsInMethodIfSupported<testing::Test, void> /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc
#4 0x34f7e88 in testing::Test::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2503:3
#5 0x34fa90c in testing::TestInfo::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2684:11
#6 0x34fbcd0 in testing::TestSuite::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:2816:28
#7 0x352b1b1 in testing::internal::UnitTestImpl::RunAllTests() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:5338:44
#8 0x352961c in HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc
#9 0x352961c in testing::UnitTest::Run() /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/src/gtest.cc:4925:10
#10 0x34e58e0 in RUN_ALL_TESTS /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/googletest/include/gtest/gtest.h:2473:46
#11 0x34e58e0 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/unittest/UnitTestMain/TestMain.cpp:50:10
#12 0x7f76b899d09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
SUMMARY: AddressSanitizer: 25 byte(s) leaked in 1 allocation(s).
================
Comment at: llvm/unittests/Passes/PassBuilderBindingsTest.cpp:19
+ LLVMInitializeNativeTarget();
+ const char *Triple = LLVMGetDefaultTargetTriple();
+ char *Err;
----------------
```
/*===-- Triple ------------------------------------------------------------===*/
/** Get a triple for the host machine as a string. The result needs to be
disposed with LLVMDisposeMessage. */
char* LLVMGetDefaultTargetTriple(void);
```
Memory leak here caused by not calling `LLVMDisposeMessage(Triple)`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102136/new/
https://reviews.llvm.org/D102136
More information about the llvm-commits
mailing list