8158851: MH.publicLookup() init circularity, triggered by custom SecurityManager with String concat and -limitmods java.base

Reviewed-by: alanb, redestad, jlaskey
This commit is contained in:
Aleksey Shipilev 2016-06-08 11:14:45 +03:00
parent 3097f1a54d
commit 41b6361f34
3 changed files with 41 additions and 19 deletions

View file

@ -2204,15 +2204,7 @@ return mh1;
}
}
private static final Class<?> PUBLIC_LOOKUP_CLASS;
static {
PrivilegedAction<Class<?>> pa = new PrivilegedAction<Class<?>>() {
public Class<?> run() {
return createClass();
}
};
PUBLIC_LOOKUP_CLASS = AccessController.doPrivileged(pa);
}
private static final Class<?> PUBLIC_LOOKUP_CLASS = createClass();
/**
* Lookup that is trusted minimally. It can only be used to create