[PATCH] D34433: [Sanitizers] 32 bit allocator respects allocator_may_return_null flag
Aleksey Shlyapnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 21 11:21:21 PDT 2017
alekseyshl marked an inline comment as done.
alekseyshl added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_allocator_local_cache.h:147
PerClass *c = &per_class_[class_id];
- if (UNLIKELY(c->count == 0))
- Refill(allocator, class_id);
+ if (UNLIKELY(c->count == 0 && !Refill(allocator, class_id)))
+ return nullptr;
----------------
cryptoad wrote:
> Doing it this way, we are losing the 'unlikeliness' of `c->count == 0`.
> I am not sure this will matter much though.
Let's bring it back then.
https://reviews.llvm.org/D34433
More information about the llvm-commits
mailing list