Mercurial > hg > truffle
comparison src/share/vm/ci/ciMethod.cpp @ 4001:5eb9169b1a14
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
Reviewed-by: jrose, never
author | twisti |
---|---|
date | Wed, 12 Oct 2011 21:00:13 -0700 |
parents | de847cac9235 |
children | 04b9a2566eec 8150fa46d2ed |
comparison
equal
deleted
inserted
replaced
4000:0abefdb54d21 | 4001:5eb9169b1a14 |
---|---|
146 // ------------------------------------------------------------------ | 146 // ------------------------------------------------------------------ |
147 // ciMethod::ciMethod | 147 // ciMethod::ciMethod |
148 // | 148 // |
149 // Unloaded method. | 149 // Unloaded method. |
150 ciMethod::ciMethod(ciInstanceKlass* holder, | 150 ciMethod::ciMethod(ciInstanceKlass* holder, |
151 ciSymbol* name, | 151 ciSymbol* name, |
152 ciSymbol* signature) : ciObject(ciMethodKlass::make()) { | 152 ciSymbol* signature, |
153 // These fields are always filled in. | 153 ciInstanceKlass* accessor) : |
154 _name = name; | 154 ciObject(ciMethodKlass::make()), |
155 _holder = holder; | 155 _name( name), |
156 _signature = new (CURRENT_ENV->arena()) ciSignature(_holder, constantPoolHandle(), signature); | 156 _holder( holder), |
157 _intrinsic_id = vmIntrinsics::_none; | 157 _intrinsic_id( vmIntrinsics::_none), |
158 _liveness = NULL; | 158 _liveness( NULL), |
159 _can_be_statically_bound = false; | 159 _can_be_statically_bound(false), |
160 _method_blocks = NULL; | 160 _method_blocks( NULL), |
161 _method_data = NULL; | 161 _method_data( NULL) |
162 #if defined(COMPILER2) || defined(SHARK) | 162 #if defined(COMPILER2) || defined(SHARK) |
163 _flow = NULL; | 163 , |
164 _bcea = NULL; | 164 _flow( NULL), |
165 _bcea( NULL) | |
165 #endif // COMPILER2 || SHARK | 166 #endif // COMPILER2 || SHARK |
167 { | |
168 // Usually holder and accessor are the same type but in some cases | |
169 // the holder has the wrong class loader (e.g. invokedynamic call | |
170 // sites) so we pass the accessor. | |
171 _signature = new (CURRENT_ENV->arena()) ciSignature(accessor, constantPoolHandle(), signature); | |
166 } | 172 } |
167 | 173 |
168 | 174 |
169 // ------------------------------------------------------------------ | 175 // ------------------------------------------------------------------ |
170 // ciMethod::load_code | 176 // ciMethod::load_code |