diff options
Diffstat (limited to 'compiler/dex/verification_results.cc')
-rw-r--r-- | compiler/dex/verification_results.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/dex/verification_results.cc b/compiler/dex/verification_results.cc index 51a3d84..150bdac 100644 --- a/compiler/dex/verification_results.cc +++ b/compiler/dex/verification_results.cc @@ -71,8 +71,11 @@ bool VerificationResults::ProcessVerifiedMethod(verifier::MethodVerifier* method DCHECK_EQ(it->second->GetSafeCastSet().size(), verified_method->GetSafeCastSet().size()); } DCHECK_EQ(it->second->GetDexGcMap().size(), verified_method->GetDexGcMap().size()); - delete it->second; - verified_methods_.erase(it); + // Delete the new verified method since there was already an existing one registered. It + // is unsafe to replace the existing one since the JIT may be using it to generate a + // native GC map. + delete verified_method; + return true; } verified_methods_.Put(ref, verified_method); DCHECK(verified_methods_.find(ref) != verified_methods_.end()); |