8151368: SA: Unexpected ArithmeticException in CompactHashTable

Add missed null check

Reviewed-by: iklam, dsamersoff
This commit is contained in:
Yuji Kubota 2016-03-14 11:45:15 +03:00 committed by Dmitry Samersoff
parent 33db96b04e
commit c5eaaffcca

View file

@ -81,6 +81,12 @@ public class CompactHashTable extends VMObject {
} }
public Symbol probe(byte[] name, long hash) { public Symbol probe(byte[] name, long hash) {
if (bucketCount() == 0) {
// The table is invalid, so don't try to lookup
return null;
}
long symOffset; long symOffset;
Symbol sym; Symbol sym;
Address baseAddress = baseAddressField.getValue(addr); Address baseAddress = baseAddressField.getValue(addr);