Mercurial > hg > graal-compiler
comparison src/share/vm/ci/ciEnv.cpp @ 8777:2dec1d9bfbe1
8009565: [partfait] Null pointer deference in hotspot/src/share/vm/ci/ciEnv.cpp
Summary: add guarantee() to get_instance_klass_for_declared_method_holder()
Reviewed-by: kvn
author | morris |
---|---|
date | Wed, 20 Mar 2013 06:36:04 -0700 |
parents | f16e75e0cf11 |
children | b9a918201d47 c115fac239eb e12c9b3740db |
comparison
equal
deleted
inserted
replaced
8776:41340544e182 | 8777:2dec1d9bfbe1 |
---|---|
800 // A more correct fix would trickle out through many interfaces in CI, | 800 // A more correct fix would trickle out through many interfaces in CI, |
801 // requiring ciInstanceKlass* to become ciKlass* and many more places would | 801 // requiring ciInstanceKlass* to become ciKlass* and many more places would |
802 // require checks to make sure the expected type was found. Given that this | 802 // require checks to make sure the expected type was found. Given that this |
803 // only occurs for clone() the more extensive fix seems like overkill so | 803 // only occurs for clone() the more extensive fix seems like overkill so |
804 // instead we simply smear the array type into Object. | 804 // instead we simply smear the array type into Object. |
805 guarantee(method_holder != NULL, "no method holder"); | |
805 if (method_holder->is_instance_klass()) { | 806 if (method_holder->is_instance_klass()) { |
806 return method_holder->as_instance_klass(); | 807 return method_holder->as_instance_klass(); |
807 } else if (method_holder->is_array_klass()) { | 808 } else if (method_holder->is_array_klass()) { |
808 return current()->Object_klass(); | 809 return current()->Object_klass(); |
809 } else { | 810 } else { |