summaryrefslogtreecommitdiff
path: root/runtime/oat.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/oat.cc')
-rw-r--r--runtime/oat.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/oat.cc b/runtime/oat.cc
index 5725b6ff6c..5625499848 100644
--- a/runtime/oat.cc
+++ b/runtime/oat.cc
@@ -134,6 +134,9 @@ bool OatHeader::IsValid() const {
if (!IsAligned<kPageSize>(image_patch_delta_)) {
return false;
}
+ if (!IsValidInstructionSet(instruction_set_)) {
+ return false;
+ }
return true;
}
@@ -156,6 +159,9 @@ std::string OatHeader::GetValidationErrorMessage() const {
if (!IsAligned<kPageSize>(image_patch_delta_)) {
return "Image patch delta not page-aligned.";
}
+ if (!IsValidInstructionSet(instruction_set_)) {
+ return StringPrintf("Invalid instruction set, %d.", static_cast<int>(instruction_set_));
+ }
return "";
}