odrefresh: check that ISA bitness matches zygote.
E.g. that we have a 64-bit ISA if we have a 64-bit zygote, and likewise
for 32 bits.
Test: treehugger
Test: boot aosp_cf_riscv64_phone-userdebug (no aborts)
Change-Id: If6f7bc6b6524b1b62a33eec07d14f99a8f86636f
diff --git a/odrefresh/odr_config.h b/odrefresh/odr_config.h
index 6f4d940..69af4cb 100644
--- a/odrefresh/odr_config.h
+++ b/odrefresh/odr_config.h
@@ -133,11 +133,15 @@
const auto [isa32, isa64] = GetPotentialInstructionSets();
switch (zygote_kind_) {
case ZygoteKind::kZygote32:
+ CHECK_NE(isa32, art::InstructionSet::kNone);
return {isa32};
case ZygoteKind::kZygote32_64:
case ZygoteKind::kZygote64_32:
+ CHECK_NE(isa32, art::InstructionSet::kNone);
+ CHECK_NE(isa64, art::InstructionSet::kNone);
return {isa32, isa64};
case ZygoteKind::kZygote64:
+ CHECK_NE(isa64, art::InstructionSet::kNone);
return {isa64};
}
}
@@ -147,9 +151,11 @@
switch (zygote_kind_) {
case ZygoteKind::kZygote32:
case ZygoteKind::kZygote32_64:
+ CHECK_NE(isa32, art::InstructionSet::kNone);
return isa32;
case ZygoteKind::kZygote64_32:
case ZygoteKind::kZygote64:
+ CHECK_NE(isa64, art::InstructionSet::kNone);
return isa64;
}
}