From 6229df2bb95c4eaa46e99d570786b2d107a6ce92 Mon Sep 17 00:00:00 2001 From: Mitch Phillips Date: Tue, 11 Feb 2020 17:23:21 -0800 Subject: [PATCH] [GWP-ASan] Scan GWP-ASan regions for native allocations. GWP-ASan is part of the native allocator, and may allocate some memory. When GWP-ASan is enabled, JNI needs to look inside of GWP-ASan regions as well for native allocations. Bug: 135634846 Test: ??? Change-Id: Id4f15544a902a034687690214c9481ab963929fc --- core/jni/android_os_Debug.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp index 7bf35f9a9864f..8f9f8d2115960 100644 --- a/core/jni/android_os_Debug.cpp +++ b/core/jni/android_os_Debug.cpp @@ -263,6 +263,8 @@ static void load_maps(int pid, stats_t* stats, bool* foundSwapPss) which_heap = HEAP_NATIVE; } else if (base::StartsWith(name, "[anon:scudo:")) { which_heap = HEAP_NATIVE; + } else if (base::StartsWith(name, "[anon:GWP-ASan")) { + which_heap = HEAP_NATIVE; } else if (base::StartsWith(name, "[stack")) { which_heap = HEAP_STACK; } else if (base::StartsWith(name, "[anon:stack_and_tls:")) {