diff options
-rw-r--r-- | core/java/com/android/internal/os/ZygoteInit.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 0bfd65936b4a..ec1f516df5f3 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -761,6 +761,10 @@ public class ZygoteInit { * this is present in all ARMv8 CPUs; this flag has no effect on other platforms. */ parsedArgs.mRuntimeFlags |= Zygote.MEMORY_TAG_LEVEL_TBI; + /* Enable gwp-asan on the system server with a small probability. This is the same + * policy as applied to native processes and system apps. */ + parsedArgs.mRuntimeFlags |= Zygote.GWP_ASAN_LEVEL_LOTTERY; + if (shouldProfileSystemServer()) { parsedArgs.mRuntimeFlags |= Zygote.PROFILE_SYSTEM_SERVER; } |