diff options
Diffstat (limited to 'compiler/image_writer.cc')
| -rw-r--r-- | compiler/image_writer.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc index 955c575198..d9f8fcb43a 100644 --- a/compiler/image_writer.cc +++ b/compiler/image_writer.cc @@ -1362,6 +1362,10 @@ void ImageWriter::FixupObject(Object* orig, Object* copy) { // If src is a ClassLoader, set the class table to null so that it gets recreated by the // ClassLoader. down_cast<mirror::ClassLoader*>(copy)->SetClassTable(nullptr); + // Also set allocator to null to be safe. The allocator is created when we create the class + // table. We also never expect to unload things in the image since they are held live as + // roots. + down_cast<mirror::ClassLoader*>(copy)->SetAllocator(nullptr); } } FixupVisitor visitor(this, copy); |