summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-03-23 16:54:17 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-03-23 16:54:17 +0000
commitc6de977f6482014a9d01a880efe3eed8bd2007e6 (patch)
tree73072a4a4151c31f6e4a8e0896d2ba378b3cd131 /compiler
parent5af26bd446660bc5d13dd6ff9470e6920a51e26e (diff)
parentb4e180844b956d4d5e22f1a17178fa8091dfea68 (diff)
Merge "Fix a bug in AddToCodeCache"
Diffstat (limited to 'compiler')
-rw-r--r--compiler/jit/jit_compiler.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index beb5755d54..8b311542f6 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -217,20 +217,21 @@ bool JitCompiler::AddToCodeCache(mirror::ArtMethod* method, const CompiledMethod
auto* const mapping_table = compiled_method->GetMappingTable();
auto* const vmap_table = compiled_method->GetVmapTable();
auto* const gc_map = compiled_method->GetGcMap();
+ CHECK(gc_map != nullptr) << PrettyMethod(method);
// Write out pre-header stuff.
uint8_t* const mapping_table_ptr = code_cache->AddDataArray(
self, mapping_table->data(), mapping_table->data() + mapping_table->size());
- if (mapping_table == nullptr) {
+ if (mapping_table_ptr == nullptr) {
return false; // Out of data cache.
}
uint8_t* const vmap_table_ptr = code_cache->AddDataArray(
self, vmap_table->data(), vmap_table->data() + vmap_table->size());
- if (vmap_table == nullptr) {
+ if (vmap_table_ptr == nullptr) {
return false; // Out of data cache.
}
uint8_t* const gc_map_ptr = code_cache->AddDataArray(
self, gc_map->data(), gc_map->data() + gc_map->size());
- if (gc_map == nullptr) {
+ if (gc_map_ptr == nullptr) {
return false; // Out of data cache.
}
// Don't touch this until you protect / unprotect the code.