Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0c8a8c8 authored by Evgenii Stepanov's avatar Evgenii Stepanov Committed by android-build-merger
Browse files

Merge "Skip memory limits under HWASan, same as ASan." am: 4eeaffe5

am: 85998cd8

Change-Id: Ic94e69066e9c34ab4e0ffeb0f8948cce9283af86
parents e2c9f08e 85998cd8
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -34,7 +34,7 @@ void limitProcessMemory(
    size_t percentageOfTotalMem) {
    size_t percentageOfTotalMem) {


    if (running_with_asan()) {
    if (running_with_asan()) {
        ALOGW("Running with ASan, skip enforcing memory limitations.");
        ALOGW("Running with (HW)ASan, skip enforcing memory limitations.");
        return;
        return;
    }
    }


+2 −1
Original line number Original line Diff line number Diff line
@@ -20,9 +20,10 @@
namespace android {
namespace android {


extern "C" void __asan_init(void) __attribute__((weak));
extern "C" void __asan_init(void) __attribute__((weak));
extern "C" void __hwasan_init(void) __attribute__((weak));


static inline int running_with_asan() {
static inline int running_with_asan() {
    return &__asan_init != 0;
    return &__asan_init != 0 || &__hwasan_init != 0;
}
}


/**
/**