commit | 5b7968882e7b0299390592ab79b7ed0eac68cbe1 | [log] [tgz] |
---|---|---|
author | Mythri Alle <mythria@google.com> | Mon Apr 25 14:28:30 2022 +0000 |
committer | Mythri Alle <mythria@google.com> | Mon Apr 25 14:31:00 2022 +0000 |
tree | bd8b2470dedd154f9f79fde384772e2ce15e5250 | |
parent | 0e8f1008bcdddb3e819caa527f26ca42e5452d9f [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
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()); } }