Verifier no longer checks dead code after failing instruction at runtime.
When a failure is detected by the verifier at runtime, the code
following the failing instruction is unreachable, and is no longer
checked. This prevents further failures from causing the whole class to
be thrown out. OTP is working again.
Change-Id: I143a76370a2bc9998df526b03219b3ae40a77093
diff --git a/src/verifier/method_verifier.h b/src/verifier/method_verifier.h
index 3e3154b..244f1f8 100644
--- a/src/verifier/method_verifier.h
+++ b/src/verifier/method_verifier.h
@@ -649,6 +649,11 @@
std::vector<std::ostringstream*> failure_messages_;
// Is there a pending hard failure?
bool have_pending_hard_failure_;
+ // Is there a pending runtime throw failure? A runtime throw failure is when an instruction
+ // would fail at runtime throwing an exception. Such an instruction causes the following code
+ // to be unreachable. This is set by Fail and used to ensure we don't process unreachable
+ // instructions that would hard fail the verification.
+ bool have_pending_runtime_throw_failure_;
// Info message log use primarily for verifier diagnostics.
std::ostringstream info_messages_;