Mercurial > hg > truffle
comparison src/share/vm/classfile/verificationType.cpp @ 1677:a5c9d63a187d
6964170: Verifier crashes
Summary: Check if klassOop != NULL rather than klass_part != NULL
Reviewed-by: kamg, never
author | apangin |
---|---|
date | Tue, 20 Jul 2010 08:41:42 -0700 |
parents | c18cbe5936b8 |
children | 60f88489896f |
comparison
equal
deleted
inserted
replaced
1676:920aa833fd16 | 1677:a5c9d63a187d |
---|---|
68 return instanceKlass::cast(from_class)->is_subclass_of(this_class); | 68 return instanceKlass::cast(from_class)->is_subclass_of(this_class); |
69 } | 69 } |
70 } else if (is_array() && from.is_array()) { | 70 } else if (is_array() && from.is_array()) { |
71 VerificationType comp_this = get_component(CHECK_false); | 71 VerificationType comp_this = get_component(CHECK_false); |
72 VerificationType comp_from = from.get_component(CHECK_false); | 72 VerificationType comp_from = from.get_component(CHECK_false); |
73 return comp_this.is_assignable_from(comp_from, context, CHECK_false); | 73 if (!comp_this.is_bogus() && !comp_from.is_bogus()) { |
74 return comp_this.is_assignable_from(comp_from, context, CHECK_false); | |
75 } | |
74 } | 76 } |
75 return false; | 77 return false; |
76 } | 78 } |
77 | 79 |
78 VerificationType VerificationType::get_component(TRAPS) const { | 80 VerificationType VerificationType::get_component(TRAPS) const { |
96 component = SymbolTable::lookup( | 98 component = SymbolTable::lookup( |
97 name(), 2, name()->utf8_length() - 1, | 99 name(), 2, name()->utf8_length() - 1, |
98 CHECK_(VerificationType::bogus_type())); | 100 CHECK_(VerificationType::bogus_type())); |
99 return VerificationType::reference_type(component); | 101 return VerificationType::reference_type(component); |
100 default: | 102 default: |
101 ShouldNotReachHere(); | 103 // Met an invalid type signature, e.g. [X |
102 return VerificationType::bogus_type(); | 104 return VerificationType::bogus_type(); |
103 } | 105 } |
104 } | 106 } |
105 | 107 |
106 #ifndef PRODUCT | 108 #ifndef PRODUCT |