mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
7092712: JSR 292: unloaded invokedynamic call sites can lead to a crash with signature types not on BCP
Reviewed-by: jrose, never
This commit is contained in:
parent
de00cc778c
commit
02db22f7e7
8 changed files with 83 additions and 38 deletions
|
@ -148,21 +148,27 @@ ciMethod::ciMethod(methodHandle h_m) : ciObject(h_m) {
|
|||
//
|
||||
// Unloaded method.
|
||||
ciMethod::ciMethod(ciInstanceKlass* holder,
|
||||
ciSymbol* name,
|
||||
ciSymbol* signature) : ciObject(ciMethodKlass::make()) {
|
||||
// These fields are always filled in.
|
||||
_name = name;
|
||||
_holder = holder;
|
||||
_signature = new (CURRENT_ENV->arena()) ciSignature(_holder, constantPoolHandle(), signature);
|
||||
_intrinsic_id = vmIntrinsics::_none;
|
||||
_liveness = NULL;
|
||||
_can_be_statically_bound = false;
|
||||
_method_blocks = NULL;
|
||||
_method_data = NULL;
|
||||
ciSymbol* name,
|
||||
ciSymbol* signature,
|
||||
ciInstanceKlass* accessor) :
|
||||
ciObject(ciMethodKlass::make()),
|
||||
_name( name),
|
||||
_holder( holder),
|
||||
_intrinsic_id( vmIntrinsics::_none),
|
||||
_liveness( NULL),
|
||||
_can_be_statically_bound(false),
|
||||
_method_blocks( NULL),
|
||||
_method_data( NULL)
|
||||
#if defined(COMPILER2) || defined(SHARK)
|
||||
_flow = NULL;
|
||||
_bcea = NULL;
|
||||
,
|
||||
_flow( NULL),
|
||||
_bcea( NULL)
|
||||
#endif // COMPILER2 || SHARK
|
||||
{
|
||||
// Usually holder and accessor are the same type but in some cases
|
||||
// the holder has the wrong class loader (e.g. invokedynamic call
|
||||
// sites) so we pass the accessor.
|
||||
_signature = new (CURRENT_ENV->arena()) ciSignature(accessor, constantPoolHandle(), signature);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue