RFR: 8269923: runtime/jni/checked/TestPrimitiveArrayCriticalWithBadParam.java failed with "FATAL ERROR in native method: Primitive type array expected but not received for JNI array operation"
Zhengyu Gu
zgu at openjdk.java.net
Tue Jul 6 19:02:59 UTC 2021
On Posix compatible platforms, when abort with code dump, it exits with os:abort(), which has exit code 134.
if (dump_core) {
LINUX_ONLY(if (DumpPrivateMappingsInCore) ClassLoader::close_jrt_image();)
::abort(); // dump core
}
but not on Windows, where it still exits with 1.
CloseHandle(dumpFile);
win32::exit_process_or_thread(win32::EPT_PROCESS, 1);
The test expects exit code 134 when jni check fails, so it fails on Windows. Maybe we should have Windows also to return 134 for consistence?
The fix changes the check to non-zero exit code.
-------------
Commit messages:
- remove test from problem list
- Merge branch 'master' into JDK-8269923-exit-code
- v0
Changes: https://git.openjdk.java.net/jdk/pull/4696/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4696&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8269923
Stats: 3 lines in 2 files changed: 0 ins; 2 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/4696.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4696/head:pull/4696
PR: https://git.openjdk.java.net/jdk/pull/4696
More information about the hotspot-runtime-dev
mailing list