Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/instanceKlass.cpp @ 8693:872b3feace55
8008750: [partfait] Null pointer deference in hotspot/src/share/vm/oops/instanceKlass.hpp
Summary: fix null pointer
Reviewed-by: kvn, coleenp
author | morris |
---|---|
date | Tue, 05 Mar 2013 18:03:36 -0800 |
parents | 927a311d00f9 |
children | 35ef86296a5d |
comparison
equal
deleted
inserted
replaced
8692:4f553e24b3b5 | 8693:872b3feace55 |
---|---|
2168 if (ClassUnloading) { | 2168 if (ClassUnloading) { |
2169 Klass* impl = implementor(); | 2169 Klass* impl = implementor(); |
2170 if (impl != NULL) { | 2170 if (impl != NULL) { |
2171 if (!impl->is_loader_alive(is_alive)) { | 2171 if (!impl->is_loader_alive(is_alive)) { |
2172 // remove this guy | 2172 // remove this guy |
2173 *adr_implementor() = NULL; | 2173 Klass** klass = adr_implementor(); |
2174 assert(klass != NULL, "null klass"); | |
2175 if (klass != NULL) { | |
2176 *klass = NULL; | |
2177 } | |
2174 } | 2178 } |
2175 } | 2179 } |
2176 } | 2180 } |
2177 } | 2181 } |
2178 } | 2182 } |
3149 guarantee(constants()->is_constantPool(), "should be constant pool"); | 3153 guarantee(constants()->is_constantPool(), "should be constant pool"); |
3150 } | 3154 } |
3151 if (protection_domain() != NULL) { | 3155 if (protection_domain() != NULL) { |
3152 guarantee(protection_domain()->is_oop(), "should be oop"); | 3156 guarantee(protection_domain()->is_oop(), "should be oop"); |
3153 } | 3157 } |
3154 if (host_klass() != NULL) { | 3158 const Klass* host = host_klass(); |
3155 guarantee(host_klass()->is_metadata(), "should be in metaspace"); | 3159 if (host != NULL) { |
3156 guarantee(host_klass()->is_klass(), "should be klass"); | 3160 guarantee(host->is_metadata(), "should be in metaspace"); |
3161 guarantee(host->is_klass(), "should be klass"); | |
3157 } | 3162 } |
3158 if (signers() != NULL) { | 3163 if (signers() != NULL) { |
3159 guarantee(signers()->is_objArray(), "should be obj array"); | 3164 guarantee(signers()->is_objArray(), "should be obj array"); |
3160 } | 3165 } |
3161 } | 3166 } |