mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-07 10:00:27 +00:00
[scudo] Return NULL when MAP_ALLOWNOMEM is set on Trusty
Back-ported from https://r.android.com/2591905. Reviewed By: Chia-hungDuan Differential Revision: https://reviews.llvm.org/D155144
This commit is contained in:
parent
bf89531c41
commit
e4316a5997
@ -50,7 +50,8 @@ void *map(void *Addr, uptr Size, const char *Name, uptr Flags,
|
||||
|
||||
if (IS_ERR(P)) {
|
||||
errno = lk_err_to_errno(PTR_ERR(P));
|
||||
dieOnMapUnmapError(Size);
|
||||
if (!(Flags & MAP_ALLOWNOMEM) || errno != ENOMEM)
|
||||
dieOnMapUnmapError(Size);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user