[scudo][standalone] Allow Primary allocations to fail up multiple times.
authorChristopher Ferris <cferris@google.com>
Thu, 18 Jun 2020 18:18:16 +0000 (11:18 -0700)
committerKostya Kortchinsky <kostyak@google.com>
Thu, 18 Jun 2020 18:46:39 +0000 (11:46 -0700)
commite7ac984dc055085e0580e90f08841ae2c4ce7cf5
tree37714f82c56997f5cc943263a7d6293feca80d0e
parent2defe557226d141a2f36f50dadb8be016683df92
[scudo][standalone] Allow Primary allocations to fail up multiple times.

Summary:
When enabling some malloc debug features on Android, multiple 32 bit
regions become exhausted, and the allocations fail. Allow allocations
to keep trying each bigger class in the Primary until it finds a fit.
In addition, some Android tests running on 32 bit fail sometimes due
to a running out of space in two regions, and then fail the allocation.

Reviewers: cryptoad

Reviewed By: cryptoad

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D82070
compiler-rt/lib/scudo/standalone/combined.h
compiler-rt/lib/scudo/standalone/tests/combined_test.cpp