[PATCH] D30723: Add red zones to BumpPtrAllocator under ASan

Pete Cooper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 11:48:56 PST 2017


pete added a comment.

In https://reviews.llvm.org/D30723#695798, @jordan_rose wrote:

> Thanks, Pete! Will land soon, then.
>
> > I think we could support SpecificBumpPtrAllocator but it would require walking the objects by 'sizeof(T) + RedZoneSize'. RedZoneSize itself would also have to be set to make sure we continue to have appropriate alignment. Not something you need to do now, but could be interesting in future.
>
> FWIW, this doesn't work as is because SpecificBumpPtrAllocator lets you allocate *arrays* of objects as well as single objects, and the arrays obviously can't have red zones between elements.


Good point.  Never thought of that.  Wouldn't be surprised if there's a whole bunch of users who never use arrays and could benefit, but still something to think about more.


Repository:
  rL LLVM

https://reviews.llvm.org/D30723





More information about the llvm-commits mailing list