From 878a6ce4e308f7be9da61a434f0288c931e2087e Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Mon, 16 Jan 2023 21:49:28 +0000 Subject: [PATCH] Change the warning for invalid ISA to notifyDexLoad to a wtf. This is a temporary measure to verify our assumptions about that argument. Later we'll assume it's the caller that's wrong. Test: Boot Bug: 251903639 Change-Id: I7c6e9764e626fb2bc8a8ab0c65df93920785c87f --- .../java/com/android/server/pm/PackageManagerService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index c2d33a78d4e77..9a15e1108b527 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -5430,9 +5430,11 @@ public class PackageManagerService implements PackageSender, TestUtilityService String loadingPkgDexCodeIsa = InstructionSets.getDexCodeInstructionSet( VMRuntime.getInstructionSet(loadingPkgAbi)); if (!loaderIsa.equals(loadingPkgDexCodeIsa)) { - // TODO(b/251903639): Make this crash to surface this problem - // better. - Slog.w(PackageManagerService.TAG, + // TODO(b/251903639): We make this a wtf to surface any situations + // where this argument doesn't correspond to our expectations. Later + // it should be turned into an IllegalArgumentException, when we can + // assume it's the caller that's wrong rather than us. + Log.wtf(TAG, "Invalid loaderIsa in notifyDexLoad call from " + loadingPackageName + ", uid " + callingUid + ": expected " + loadingPkgDexCodeIsa + ", got "