[PATCH] D51317: Keep BumpPtrAllocator::Allocate(0) from returning nullptr

Brent Royal-Gordon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 29 16:09:29 PDT 2018


brentdax planned changes to this revision.
brentdax added a comment.

If we end up in a place where you’d still want to avoid empty allocations, then I think we should go back to the previous implementation. Current clients are already receiving duplicate addresses, so this won’t cause any new bugs. We can clearly document the behavior.

An alternative might be to return deliberately invalid addresses, for instance by returning addresses from a guard page. That seems overengineered, though—I think duplicate addresses are fine.


Repository:
  rL LLVM

https://reviews.llvm.org/D51317





More information about the llvm-commits mailing list