RFR: 8300139 : [AIX] Use pthreads to avoid JNI_createVM call from primordial thread [v3]

Thomas Stuefe stuefe at openjdk.org
Thu Feb 9 11:35:55 UTC 2023


On Thu, 9 Feb 2023 11:17:54 GMT, Varada M <duke at openjdk.org> wrote:

>> 1. test/jdk/jni/nullCaller/NullCallerTest.java
>> 2. test/jdk/java/lang/reflect/exeCallerAccessTest/CallerAccessTest.java
>> 3. test/hotspot/jtreg/runtime/jni/CalleeSavedRegisters/FPRegs.java 
>> 
>>     The above tests were blocked on AIX [@require os.family != "aix"] because these tests are failing to call JNI_CreateJavaVM. This is solved by implementing JNI_CreateJavaVM call via POSIX threads. 
>>    Similarly there are tests which are not blocked and still failing to call JNI_CreateJavaVM on AIX :
>> 
>> 4. test/hotspot/jtreg/runtime/jni/daemonDestroy/TestDaemonDestroy.java { PR : [12006](https://github.com/openjdk/jdk/pull/12006) }
>> 5. test/lib-test/jdk/test/lib/process/TestNativeProcessBuilder.java 
>> 
>> The reported issue : [8300139](https://bugs.openjdk.org/browse/JDK-8300139l)
>
> Varada M has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixes

Small nits remain, nothing major.

test/hotspot/jtreg/runtime/jni/CalleeSavedRegisters/FPRegs.java line 28:

> 26:  * @test
> 27:  * @bug 8067744
> 28:  * @comment Test uses custom launcher that starts VM in primordial thread. This is

Please remove outdated comment

test/hotspot/jtreg/runtime/jni/CalleeSavedRegisters/exeFPRegs.c line 113:

> 111:      int argc;
> 112:      char **argv;
> 113: } args_list;

Please keep indentation consistent; part of the program uses 2, part 4

test/hotspot/jtreg/runtime/jni/CalleeSavedRegisters/exeFPRegs.c line 115:

> 113: } args_list;
> 114: 
> 115: void* run(void* argp){

Please make static; no need to export this from the compilation unit.

test/jdk/java/lang/reflect/exeCallerAccessTest/CallerAccessTest.java line 29:

> 27:  * @bug 8221530 8221642
> 28:  * @summary Test uses custom launcher that starts VM using JNI that verifies
> 29:  *          reflection API with null caller class

Comment outdated (just remove)

test/jdk/java/lang/reflect/exeCallerAccessTest/exeCallerAccessTest.c line 48:

> 46: int checkAccess(JNIEnv *env, char* declaringClass_name, char* field_name, jboolean canAccess);
> 47: 
> 48: void* run(void* argp){

static

test/jdk/java/lang/reflect/exeCallerAccessTest/exeCallerAccessTest.c line 243:

> 241: }
> 242: 
> 243: int main(int argc, char *argv[]){

space after )

test/jdk/jni/nullCaller/exeNullCallerTest.cpp line 159:

> 157: }
> 158: 
> 159: int main(int argc, char** args) {

static, and space

test/jdk/jni/nullCaller/exeNullCallerTest.cpp line 190:

> 188: }
> 189: 
> 190: int main(int argc, char *argv[]){

space

test/lib-test/jdk/test/lib/process/exejvm-test-launcher.c line 31:

> 29: #endif //AIX
> 30: 
> 31: void* run(void *arg){

space

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

PR: https://git.openjdk.org/jdk/pull/12302


More information about the core-libs-dev mailing list