Mercurial > hg > truffle
comparison src/share/vm/ci/ciInstanceKlass.cpp @ 1924:b0e6879e48fa
6839891: Array overrun in vm ci
Summary: fix index check
Reviewed-by: never
author | kvn |
---|---|
date | Tue, 09 Nov 2010 17:31:18 -0800 |
parents | d55217dc206f |
children | 2d26b0046e0d f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1923:2db84614f61d | 1924:b0e6879e48fa |
---|---|
562 // of _nof_implementors might be out of date with respect | 562 // of _nof_implementors might be out of date with respect |
563 // to results returned by instanceKlass::implementor. | 563 // to results returned by instanceKlass::implementor. |
564 // This is OK, since any dependencies we decide to assert | 564 // This is OK, since any dependencies we decide to assert |
565 // will be checked later under the Compile_lock. | 565 // will be checked later under the Compile_lock. |
566 ciInstanceKlass* ciInstanceKlass::implementor(int n) { | 566 ciInstanceKlass* ciInstanceKlass::implementor(int n) { |
567 if (n > implementors_limit) { | 567 if (n >= implementors_limit) { |
568 return NULL; | 568 return NULL; |
569 } | 569 } |
570 ciInstanceKlass* impl = _implementors[n]; | 570 ciInstanceKlass* impl = _implementors[n]; |
571 if (impl == NULL) { | 571 if (impl == NULL) { |
572 if (_nof_implementors > implementors_limit) { | 572 if (_nof_implementors > implementors_limit) { |