diff options
author | 2023-07-20 13:25:52 +0100 | |
---|---|---|
committer | 2023-07-20 14:10:45 +0000 | |
commit | e5a09b184db65ab5802824e0102f7a42f3d9b184 (patch) | |
tree | fa430364226fd4558d7305d61d8c2005e22fdbf3 /runtime/class_linker.cc | |
parent | 05b559a5f14d422940edd187ce1d3aca810740e9 (diff) |
Fix a bug in image generation due to default conflict methods.
There were inconsistencies in HasCodeItem/IsInvokable which lead to the
default conflict ArtMethod pointing to arbitrary data.
Test: 845-data-image
Bug: 290519059
Change-Id: I980c3fdac0ebf29474b166d0acfe27eef1d566c8
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r-- | runtime/class_linker.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index eb75c6bdaf..0ba63ad0c4 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -8039,6 +8039,7 @@ void ClassLinker::LinkMethodsHelper<kPointerSize>::ReallocMethods(ObjPtr<mirror: constexpr uint32_t kSetFlags = kAccDefault | kAccAbstract | kAccCopied; constexpr uint32_t kMaskFlags = ~(kAccSkipAccessChecks | kAccSingleImplementation); new_method.SetAccessFlags((access_flags | kSetFlags) & kMaskFlags); + new_method.SetDataPtrSize(nullptr, kPointerSize); DCHECK(new_method.IsDefaultConflicting()); DCHECK(!new_method.IsAbstract()); // The actual method might or might not be marked abstract since we just copied it from |