diff options
| author | 2020-09-17 17:34:34 +0100 | |
|---|---|---|
| committer | 2020-09-24 08:26:53 +0000 | |
| commit | 25b9c7da44cd4652aa2ba26aa105509a6d035632 (patch) | |
| tree | b11d09d13e3d3c29d9782ab9b7f8521bc58747e8 /runtime/stack.cc | |
| parent | 6d69b52f331f788cbd1f21ffd5b87cb3b39965e4 (diff) | |
Don't store copied methods in BSS.
Otherwise, we can end up in a state where the method on the stack is
unrelated to the receiver.
Also fix a comment related to GetCanonicalMethod and
StackVisitor::ValidateFrame.
Test: 810-checker-invoke-super-default
Change-Id: I3030e4af6059f7a4a7a1f046f2aabae8ce9057da
Diffstat (limited to 'runtime/stack.cc')
| -rw-r--r-- | runtime/stack.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc index a20f40c8ce..094c25b97a 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -711,8 +711,8 @@ void StackVisitor::ValidateFrame() const { LinearAlloc* const linear_alloc = runtime->GetLinearAlloc(); if (!linear_alloc->Contains(method)) { // Check class linker linear allocs. - // We get the canonical method as copied methods may have their declaring - // class from another class loader. + // We get the canonical method as copied methods may have been allocated + // by a different class loader. const PointerSize ptrSize = runtime->GetClassLinker()->GetImagePointerSize(); ArtMethod* canonical = method->GetCanonicalMethod(ptrSize); ObjPtr<mirror::Class> klass = canonical->GetDeclaringClass(); |