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
Wed Jul 7 11:50:52 UTC 2021
On Tue, 6 Jul 2021 20:52:07 GMT, Daniel D. Daugherty <dcubed 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?
@dcubed-ojdk @dholmes-ora Thanks for the reviews. GHA all clean.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4696
More information about the hotspot-runtime-dev
mailing list