From acb01387a9863654924891e1d1dfea274f1c9028 Mon Sep 17 00:00:00 2001 From: Yevgeny Rouban Date: Mon, 24 Nov 2014 13:40:56 +0600 Subject: [PATCH] ART: ELF symbol table lookup is fixed ELF loader could not find some symbols in the OAT's symbol table (e.g. oatdata, oatexec). There was a bug in the symbol hash table lookup: if a valid index of a chain got greater or equal than the number of hash buckets then the chain was cut off. The fix is to compare the chain index with the chains array length rather than with the number of buckets. Change-Id: I20940957c3045913fd426031a51314d4f87ac1bd Signed-off-by: Yevgeny Rouban --- runtime/elf_file.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/elf_file.cc b/runtime/elf_file.cc index 37c5f9c97..65972359e 100644 --- a/runtime/elf_file.cc +++ b/runtime/elf_file.cc @@ -794,7 +794,7 @@ template ::GetHashChain(size_t i, bool* ok) const { - if (i >= GetHashBucketNum()) { + if (i >= GetHashChainNum()) { *ok = false; return 0; } -- 2.11.0