8219652: [aix] Tests failing with JNI attach problems.
Reviewed-by: dholmes, cjplummer, sspitsyn
This commit is contained in:
parent
8c0d026d0f
commit
0b0f8b55a6
@ -92,7 +92,6 @@ gc/stress/TestStressG1Humongous.java 8286554 windows-x64
|
||||
# :hotspot_runtime
|
||||
|
||||
|
||||
runtime/jni/terminatedThread/TestTerminatedThread.java 8219652 aix-ppc64
|
||||
runtime/handshake/HandshakeSuspendExitTest.java 8294313 generic-all
|
||||
runtime/os/TestTracePageSizes.java#no-options 8267460 linux-aarch64
|
||||
runtime/os/TestTracePageSizes.java#explicit-large-page-size 8267460 linux-aarch64
|
||||
@ -157,9 +156,6 @@ vmTestbase/metaspace/gc/firstGC_99m/TestDescription.java 8208250 generic-all
|
||||
vmTestbase/metaspace/gc/firstGC_default/TestDescription.java 8208250 generic-all
|
||||
|
||||
vmTestbase/nsk/jvmti/AttachOnDemand/attach045/TestDescription.java 8202971 generic-all
|
||||
vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/TestDescription.java 8219652 aix-ppc64
|
||||
vmTestbase/nsk/jvmti/scenarios/jni_interception/JI06/ji06t001/TestDescription.java 8219652 aix-ppc64
|
||||
vmTestbase/nsk/jvmti/SetJNIFunctionTable/setjniftab001/TestDescription.java 8219652 aix-ppc64
|
||||
vmTestbase/nsk/jvmti/scenarios/capability/CM03/cm03t001/TestDescription.java 8073470 linux-all
|
||||
vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java 8288911 macosx-all
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -29,6 +29,8 @@
|
||||
|
||||
#include "jni.h"
|
||||
|
||||
#define STACK_SIZE 0x100000
|
||||
|
||||
JavaVM* jvm;
|
||||
jobject nativeThread;
|
||||
|
||||
@ -79,11 +81,14 @@ Java_TestTerminatedThread_createTerminatedThread
|
||||
fprintf(stderr, "Test ERROR. Can't extract JavaVM: %d\n", res);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if ((res = pthread_create(&thread, NULL, thread_start, NULL)) != 0) {
|
||||
pthread_attr_t attr;
|
||||
pthread_attr_init(&attr);
|
||||
pthread_attr_setstacksize(&attr, STACK_SIZE);
|
||||
if ((res = pthread_create(&thread, &attr, thread_start, NULL)) != 0) {
|
||||
fprintf(stderr, "TEST ERROR: pthread_create failed: %s (%d)\n", strerror(res), res);
|
||||
exit(1);
|
||||
}
|
||||
pthread_attr_destroy(&attr);
|
||||
|
||||
if ((res = pthread_join(thread, NULL)) != 0) {
|
||||
fprintf(stderr, "TEST ERROR: pthread_join failed: %s (%d)\n", strerror(res), res);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -128,11 +128,16 @@ void* THREAD_start(void* t) {
|
||||
return NULL;
|
||||
}
|
||||
#else // !windows & !sun
|
||||
int result = pthread_create(&(thread->id),NULL,procedure,thread);
|
||||
pthread_attr_t attr;
|
||||
pthread_attr_init(&attr);
|
||||
size_t stack_size = 0x100000;
|
||||
pthread_attr_setstacksize(&attr, stack_size);
|
||||
int result = pthread_create(&(thread->id), &attr, procedure, thread);
|
||||
if (result != 0) {
|
||||
perror("failed to create a native thread");
|
||||
return NULL;
|
||||
}
|
||||
pthread_attr_destroy(&attr);
|
||||
#endif // !windows & !sun
|
||||
};
|
||||
return thread;
|
||||
|
Loading…
Reference in New Issue
Block a user