[LLVMdev] Bug in Support/Allocator.h

Duncan P. N. Exon Smith dexonsmith at apple.com
Mon May 11 09:53:18 PDT 2015


> On 2015 May 11, at 08:38, Kal <b17c0de at gmail.com> wrote:
> 
> Here is a real patch.

Please re-post to llvm-commits at cs.uiuc.edu.

I only skimmed the patch, but it looks like it's missing a
testcase.  You can probably find a good spot for a unit test in
unittests/Support/.

Thanks for working on this!

> 
> 
> -------- Weitergeleitete Nachricht --------
> Betreff:	Bug in Support/Allocator.h
> Datum:	Mon, 11 May 2015 17:25:45 +0200
> Von: 	Kal <b17c0de at gmail.com>
> An: 	LLVM Developers Mailing List (llvmdev at cs.uiuc.edu) <llvmdev at cs.uiuc.edu>
> 
> 
> Hi,
> llvm::BumpPtrAllocatorImpl::Reset() looks like it has a bug.
> 
> There is this check at the top:
>     if (Slabs.empty())
>       return;
> 
> But what if you don't have any normal Slabs allocated but only 
> CustomSizedSlabs.
> 
> I think this should be:
> 
>     if (Slabs.empty() && CustomSizedSlabs.empty())
>       return;
> 
> 
> 
> 
> <bump-ptr-allocator-fix.diff>_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list