am ad639c1d
: am 877ad30f
: am 507bcabb
: am e03ab936
: Merge "Add missing MALLOC_FAILURE_ACTION calls to dlmalloc."
* commit 'ad639c1d2bf0c12a77c24a3247cedf86cc719d6e': Add missing MALLOC_FAILURE_ACTION calls to dlmalloc.
This commit is contained in:
commit
5f517ce256
@ -4049,12 +4049,20 @@ static void* sys_alloc(mstate m, size_t nb) {
|
||||
}
|
||||
|
||||
asize = granularity_align(nb + SYS_ALLOC_PADDING);
|
||||
if (asize <= nb)
|
||||
if (asize <= nb) {
|
||||
/* BEGIN android-added: set errno */
|
||||
MALLOC_FAILURE_ACTION;
|
||||
/* END android-added */
|
||||
return 0; /* wraparound */
|
||||
}
|
||||
if (m->footprint_limit != 0) {
|
||||
size_t fp = m->footprint + asize;
|
||||
if (fp <= m->footprint || fp > m->footprint_limit)
|
||||
if (fp <= m->footprint || fp > m->footprint_limit) {
|
||||
/* BEGIN android-added: set errno */
|
||||
MALLOC_FAILURE_ACTION;
|
||||
/* END android-added */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user