summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dex2oat/dex2oat_test.cc23
-rw-r--r--runtime/verifier/method_verifier.cc2
2 files changed, 1 insertions, 24 deletions
diff --git a/dex2oat/dex2oat_test.cc b/dex2oat/dex2oat_test.cc
index cc29b0f3c8..06b3626bc3 100644
--- a/dex2oat/dex2oat_test.cc
+++ b/dex2oat/dex2oat_test.cc
@@ -1387,29 +1387,6 @@ TEST_F(Dex2oatVerifierAbort, HardFail) {
EXPECT_EQ(0, res_no_fail);
}
-TEST_F(Dex2oatVerifierAbort, SoftFail) {
- // Use VerifierDepsMulti as it has soft-failing classes.
- std::unique_ptr<const DexFile> dex(OpenTestDexFile("VerifierDepsMulti"));
- std::string out_dir = GetScratchDir();
- const std::string base_oat_name = out_dir + "/base.oat";
- std::string error_msg;
- const int res_fail = GenerateOdexForTestWithStatus(
- {dex->GetLocation()},
- base_oat_name,
- CompilerFilter::Filter::kVerify,
- &error_msg,
- {"--abort-on-soft-verifier-error"});
- EXPECT_NE(0, res_fail);
-
- const int res_no_fail = GenerateOdexForTestWithStatus(
- {dex->GetLocation()},
- base_oat_name,
- CompilerFilter::Filter::kVerify,
- &error_msg,
- {"--no-abort-on-soft-verifier-error"});
- EXPECT_EQ(0, res_no_fail);
-}
-
class Dex2oatDedupeCode : public Dex2oatTest {};
TEST_F(Dex2oatDedupeCode, DedupeTest) {
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index b94161166a..72be7777a8 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -2527,7 +2527,7 @@ bool MethodVerifier<kVerifierDebug>::CodeFlowVerifyInstruction(uint32_t* start_g
Fail(VERIFY_ERROR_BAD_CLASS_HARD) << "thrown value of non-reference type " << res_type;
} else {
Fail(res_type.IsUnresolvedTypes()
- ? VERIFY_ERROR_UNRESOLVED_TYPE_CHECK : VERIFY_ERROR_BAD_CLASS_SOFT)
+ ? VERIFY_ERROR_UNRESOLVED_TYPE_CHECK : VERIFY_ERROR_BAD_CLASS_HARD)
<< "thrown class " << res_type << " not instanceof Throwable";
}
}