Store a copy of MethodDebugInfo in ElfWriter
Bug: http://b/62418787
Store a copy of the debug info instead of a reference, since this is
written in the background by a separate thread.
Test: make -j36 PRODUCT-aosp_x86_64-eng dist checkbuild \
ASAN_OPTIONS=detect_leaks=0 SANITIZE_HOST=address \
FORCE_BUILD_LLVM_COMPONENTS=true
doesn't have dex2oat asan failures that are otherwise seen.
Change-Id: I2599f5b607f956191db01924730a2e98421b5d77
diff --git a/compiler/elf_writer_quick.cc b/compiler/elf_writer_quick.cc
index 738f5a2..1ef722f 100644
--- a/compiler/elf_writer_quick.cc
+++ b/compiler/elf_writer_quick.cc
@@ -80,7 +80,7 @@
const InstructionSetFeatures* instruction_set_features_;
size_t rodata_section_size_;
size_t text_section_size_;
- const ArrayRef<const debug::MethodDebugInfo>& method_infos_;
+ const ArrayRef<const debug::MethodDebugInfo> method_infos_;
std::vector<uint8_t> result_;
};