The test log for JDK-8344804 shows a JNI Checker warning:
WARNING in native method: JNI FindClass received a bad class descriptor "Ljava/lang/Module;". A correct class descriptor has no leading "L" or trailing ";". Incorrect descriptors will not be accepted in future releases.
The test then times out. Fixing this one JNI Checker warning does not fix the test failure, because there are other warnings that follow. When I addressed all the "in native method" warnings in all the debugger related tests, then the test started to pass.
This CR is only for addressing the "in native method" warnings. There are still others present. The most common seems to be the following, which this CR is not addressing:
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by nsk.share.jdi.MonitorEnterExecutor in an unnamed module (file:/scratch/cplummer/ws/jdk/jdk.clean2/build/linux-x64-debug/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/classes/3/vmTestbase/)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
WARNING in native method: JNI FindClass received a bad class descriptor "Ljava/lang/Module;". A correct class descriptor has no leading "L" or trailing ";". Incorrect descriptors will not be accepted in future releases.
The test then times out. Fixing this one JNI Checker warning does not fix the test failure, because there are other warnings that follow. When I addressed all the "in native method" warnings in all the debugger related tests, then the test started to pass.
This CR is only for addressing the "in native method" warnings. There are still others present. The most common seems to be the following, which this CR is not addressing:
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by nsk.share.jdi.MonitorEnterExecutor in an unnamed module (file:/scratch/cplummer/ws/jdk/jdk.clean2/build/linux-x64-debug/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/classes/3/vmTestbase/)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
- relates to
-
JDK-8344804 Test serviceability/jdwp/AllModulesCommandTest.java times out after JNI check warning
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/77cfcee8
-
Review(master) openjdk/jdk/22528