mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8339285: Test fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames
Reviewed-by: alanb
This commit is contained in:
parent
48d79431c9
commit
9e1af8cc7c
9 changed files with 241 additions and 41 deletions
|
@ -2450,7 +2450,8 @@ public abstract class ClassLoader {
|
|||
* @param javaName the native method's declared name
|
||||
*/
|
||||
static long findNative(ClassLoader loader, Class<?> clazz, String entryName, String javaName) {
|
||||
long addr = findNativeInternal(loader, entryName);
|
||||
NativeLibraries nativeLibraries = nativeLibrariesFor(loader);
|
||||
long addr = nativeLibraries.find(entryName);
|
||||
if (addr != 0 && loader != null) {
|
||||
Reflection.ensureNativeAccess(clazz, clazz, javaName, true);
|
||||
}
|
||||
|
@ -2462,11 +2463,11 @@ public abstract class ClassLoader {
|
|||
* to avoid a restricted check, as that check has already been performed when
|
||||
* obtaining the lookup.
|
||||
*/
|
||||
static long findNativeInternal(ClassLoader loader, String entryName) {
|
||||
static NativeLibraries nativeLibrariesFor(ClassLoader loader) {
|
||||
if (loader == null) {
|
||||
return BootLoader.getNativeLibraries().find(entryName);
|
||||
return BootLoader.getNativeLibraries();
|
||||
} else {
|
||||
return loader.libraries.find(entryName);
|
||||
return loader.libraries;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue