Fix stub_test after semantic conflicting merge.
https://android-review.googlesource.com/#/c/209881/ does
not set the ImtConflictTable when we're a AOT runtime, which the
stub test pretends to be.
Change-Id: I70e00b265e982b46b577ff19ac9272cfee45940d
diff --git a/runtime/arch/stub_test.cc b/runtime/arch/stub_test.cc
index 759f807..969a038 100644
--- a/runtime/arch/stub_test.cc
+++ b/runtime/arch/stub_test.cc
@@ -2003,16 +2003,15 @@
// We construct the ImtConflictTable ourselves, as we cannot go into the runtime stub
// that will create it: the runtime stub expects to be called by compiled code.
- ArtMethod* runtime_conflict_method = Runtime::Current()->GetImtConflictMethod();
LinearAlloc* linear_alloc = Runtime::Current()->GetLinearAlloc();
ArtMethod* conflict_method = Runtime::Current()->CreateImtConflictMethod(linear_alloc);
- ImtConflictTable* runtime_conflict_table =
- runtime_conflict_method->GetImtConflictTable(sizeof(void*));
+ static ImtConflictTable::Entry empty_entry = { nullptr, nullptr };
+ ImtConflictTable* empty_conflict_table = reinterpret_cast<ImtConflictTable*>(&empty_entry);
void* data = linear_alloc->Alloc(
self,
- ImtConflictTable::ComputeSizeWithOneMoreEntry(runtime_conflict_table));
+ ImtConflictTable::ComputeSizeWithOneMoreEntry(empty_conflict_table));
ImtConflictTable* new_table = new (data) ImtConflictTable(
- runtime_conflict_table, inf_contains, contains_amethod);
+ empty_conflict_table, inf_contains, contains_amethod);
conflict_method->SetImtConflictTable(new_table);
size_t result =