commit | 4064ea75b0a62b70dd6c6e8e52d0c4f863373058 | [log] [tgz] |
---|---|---|
author | Mythri Alle <mythria@google.com> | Mon Apr 25 14:28:30 2022 +0000 |
committer | Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | Thu Apr 28 08:33:43 2022 +0000 |
tree | a39b8c1911caab8418f8941820d96ce4939cee6e | |
parent | b33ae53da579c805b7b9acf579ac5203e7c9e1d2 [diff] |
Update return value after method exit hook callback MethodExitHook could potentially cause a GC and we need to update the return value since GC could move a reference. Test: art/test.py Bug: 208587492 Change-Id: Id734a08dd5586c88ac467aa88013f9616cbe4203 (cherry picked from commit 5b7968882e7b0299390592ab79b7ed0eac68cbe1) Merged-In: Id734a08dd5586c88ac467aa88013f9616cbe4203
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc index 2086fa2..898b34d 100644 --- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -2717,6 +2717,7 @@ if (is_ref) { // Restore the return value if it's a reference since it might have moved. *reinterpret_cast<mirror::Object**>(gpr_result) = res.Get(); + return_value.SetL(res.Get()); } }