summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_checker.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2021-05-21 16:36:23 +0100
committer Vladimir Marko <vmarko@google.com> 2021-05-24 13:03:10 +0000
commitd42902692d1fbb101a3c60ba314df69005da9c83 (patch)
tree76d495db0ab6160c1fe1b0e1f046da1260272265 /compiler/optimizing/graph_checker.cc
parent8f8935ce292bec925e8a18719227df9ad06a111d (diff)
dex2oat: Abort app compilation without boot image.
Also avoid crash in GraphChecker for bad instructions that throw into catch block but do not have an environment. And DCHECK() that java_lang_Double_doubleToRawLongBits and java_lang_Float_floatToRawIntBits are intrinsics. Test: New test Dex2oatTest.MissingBootImageTest. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 188684102 Change-Id: I13ec2ee8a7968c0a5652aa67ec6291d07a986c80
Diffstat (limited to 'compiler/optimizing/graph_checker.cc')
-rw-r--r--compiler/optimizing/graph_checker.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc
index 44de54eccf..d1769cea0d 100644
--- a/compiler/optimizing/graph_checker.cc
+++ b/compiler/optimizing/graph_checker.cc
@@ -507,7 +507,12 @@ void GraphChecker::VisitInstruction(HInstruction* instruction) {
}
}
- if (instruction->CanThrowIntoCatchBlock()) {
+ if (instruction->CanThrow() && !instruction->HasEnvironment()) {
+ AddError(StringPrintf("Throwing instruction %s:%d in block %d does not have an environment.",
+ instruction->DebugName(),
+ instruction->GetId(),
+ current_block_->GetBlockId()));
+ } else if (instruction->CanThrowIntoCatchBlock()) {
// Find the top-level environment. This corresponds to the environment of
// the catch block since we do not inline methods with try/catch.
HEnvironment* environment = instruction->GetEnvironment();