vg_leak issues

NAKAMURA Takumi geek4civic at
Mon Nov 11 04:53:43 PST 2013

It has a few issues in trunk;

Failing Tests (4):
    LLVM :: CodeGen/ARM/fast-isel-call.ll
    LLVM :: CodeGen/ARM/fast-isel-intrinsic.ll
    LLVM-Unit :: IR/Debug+Asserts/IRTests/IRBuilderTest.RAIIHelpersTest
    LLVM-Unit :: Linker/Debug+Asserts/LinkerTests/LinkModuleTest.BlockAddress

* ARMFastISel

Introduced in r158368 (Chad, Jush).
+unsigned ARMFastISel::getLibcallReg(const Twine &Name) {
+  GlobalValue *GV = new GlobalVariable(Type::getInt32Ty(*Context), false,
+                                       GlobalValue::ExternalLinkage, 0, Name);
+  return ARMMaterializeGV(GV, TLI.getValueType(GV->getType()));

GV leaks.

* IRTests/IRBuilderTest.RAIIHelpersTest

MDNode(s), created by MDB, is leaking.
In IRBuilderTests, getGlobalContext() is used. It is not freed unless
llvm_shutdown() is called.
I think it would work if a domestic LLVMContext were used instead of
the global context.
(See also MDBuilderTest.cpp)

* LinkerTests/LinkModuleTest.BlockAddress

Excuse me, it has not been reproduced to me.

FYI, tblgen leaks many Record(s). I think they might be trivial, since
tblgen is still a tool.
Then, suppressing errors with XFAIL:vg_leak might be reasonable here.
I suppressed 36 tests of llvm/test/TableGen in r194353.


More information about the llvm-commits mailing list