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"

Daniel D.Daugherty dcubed at openjdk.java.net
Tue Jul 6 20:54: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.

@zhengyu123 - I forgot to ask about what testing has been done?

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

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


More information about the hotspot-runtime-dev mailing list