[LLVMdev] Checker for destruction-needing classes allocated in BumpPtrAllocators?

Jeffrey Yasskin jyasskin at google.com
Thu Mar 18 23:02:33 PDT 2010


Hi Ted,

Doug said you might have a clang-based checker that would detect when
people allocate memory with a BumpPtrAllocator and then construct a
class into it that needs destruction. In killing valgrind-found memory
leaks in LLVM, I've found several instances of this mistake. They
often involve SmallVectors, which only show up as leaks in valgrind if
they happen to overflow their static allocation, so it would be useful
to also check this statically. Could you point me to any code you have
for this?

Thanks,
Jeffrey



More information about the llvm-dev mailing list