From 4d02711ea578dbb789abb30cbaf12f9926e13d81 Mon Sep 17 00:00:00 2001 From: Roland Levillain Date: Wed, 1 Jul 2015 15:41:14 +0100 Subject: Implement heap poisoning in ART's Optimizing compiler. - Instrument ARM, ARM64, x86 and x86-64 code generators. - Note: To turn heap poisoning on in Optimizing, set the environment variable `ART_HEAP_POISONING' to "true" before compiling ART. Bug: 12687968 Change-Id: Ib3120b38cf805a8a50207a314b9ccc90c8d93740 --- compiler/dex/quick/quick_compiler.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/dex/quick/quick_compiler.cc') diff --git a/compiler/dex/quick/quick_compiler.cc b/compiler/dex/quick/quick_compiler.cc index 28c485a41c..39496a4b30 100644 --- a/compiler/dex/quick/quick_compiler.cc +++ b/compiler/dex/quick/quick_compiler.cc @@ -653,6 +653,12 @@ CompiledMethod* QuickCompiler::Compile(const DexFile::CodeItem* code_item, uint32_t method_idx, jobject class_loader, const DexFile& dex_file) const { + if (kPoisonHeapReferences) { + VLOG(compiler) << "Skipping method : " << PrettyMethod(method_idx, dex_file) + << " Reason = Quick does not support heap poisoning."; + return nullptr; + } + // TODO: check method fingerprint here to determine appropriate backend type. Until then, use // build default. CompilerDriver* driver = GetCompilerDriver(); -- cgit v1.2.3-59-g8ed1b