Integrated: 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
Wed Jul 7 11:50:52 UTC 2021


On Tue, 6 Jul 2021 18:52:46 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> 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.

This pull request has now been integrated.

Changeset: bffb1a71
Author:    Zhengyu Gu <zgu at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/bffb1a7199800ee05bf5fe32b7a6867fdd7bfbbf
Stats:     3 lines in 2 files changed: 0 ins; 2 del; 1 mod

8269923: runtime/jni/checked/TestPrimitiveArrayCriticalWithBadParam.java failed with "FATAL ERROR in native method: Primitive type array expected but not received for JNI array operation"

Reviewed-by: dcubed, dholmes

-------------

PR: https://git.openjdk.java.net/jdk/pull/4696


More information about the hotspot-runtime-dev mailing list