[LLVMbugs] [Bug 7231] New: LLVMContext's ownership rules are inconsistent with LLVM convention

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 25 14:15:57 PDT 2010


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

           Summary: LLVMContext's ownership rules are inconsistent with
                    LLVM convention
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Core LLVM classes
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: gohman at apple.com
                CC: llvmbugs at cs.uiuc.edu


Currently, LLVMContext does not own its Modules, meaning that it does not have
a list of live Modules and it does not delete Modules in its destructor.  This
is inconsistent with Module, which owns its Functions, Function, which owns its
BasicBlocks, and BasicBlock, which owns its Instructions.

I just debugged some LLVM client code which deleted an LLVMContext without
deleting the associated Modules, and the failure mode was non-obvious.

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