[LLVMdev] Possible Bad Assertion in Value.cpp

Chris Lattner sabre at nondot.org
Fri Feb 15 16:45:17 PST 2008


On Feb 15, 2008, at 4:38 PM, John Criswell wrote:

> Chris Lattner wrote:
>>>> If you write your code as an llvm pass, you should automatically  
>>>> get
>>>> notified of this stuff in a debug build.  If you can't do that,
>>>> manually interfacing to the LeakDetector can help.
>>>>
>>>>
>>> It is an LLVM pass, it's a debug build, and the only assertion I got
>>> was
>>> the one in ~Value().
>>>
>>> Should there have been an earlier assertion?
>>>
>>
>> You load a module, run your pass (which leaks an instruction) from  
>> the
>> passmgr, then delete the module?
>>
> Yes, that's what the code was doing.

If you're sure that you're leaking in instruction and it isn't getting  
caught, please try to figure out why leak detector isn't seeing it.   
LeakDetector is a really trivial class: if you add a breakpoint to  
addGarbage/removeGarbage, you should be able to see what isn't  
happening.

-Chris



More information about the llvm-dev mailing list