[LLVMbugs] [Bug 7972] New: Memory leaks in LLVM

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Aug 23 06:36:09 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7972

           Summary: Memory leaks in LLVM
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Core LLVM classes
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: WheretIB at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=5402)
 --> (http://llvm.org/bugs/attachment.cgi?id=5402)
Test file that shows the leaks

There are 29 memory leaks in static LLVM objects in my configuration.

I use Microsoft Visual Studio 2005 and LLVM is compiled in Debug configuration.

Attachment shows an example of a simple leak detector and its output.

The reason for leaks is that PassRegistry object is never freed
(PassRegistry.cpp)
There is a cleanupPassRegistry function, that is passed to ManagedCleanup
object
(ManagedCleanup<&cleanupPassRegistry> ManagedCleanup ATTRIBUTE_USED;)
but ManagedCleanup overload for function doesn't have a constructor or
destructor, and no one's calling the Register method.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list