8303549: [AIX] TestNativeStack.java is failing with exit value 1
Reviewed-by: dholmes, gziemski
This commit is contained in:
parent
24abd1054e
commit
5ff42d1429
test/hotspot/jtreg/runtime/jni
@ -89,14 +89,19 @@ void *thread_runner(void *threadid) {
|
||||
|
||||
int main (int argc, char* argv[]) {
|
||||
pthread_t threads[NUM_THREADS];
|
||||
pthread_attr_t attr;
|
||||
pthread_attr_init(&attr);
|
||||
size_t stack_size = 0x100000;
|
||||
pthread_attr_setstacksize(&attr, stack_size);
|
||||
for (int i = 0; i < NUM_THREADS; i++ ) {
|
||||
printf("[*] Creating thread %d\n", i);
|
||||
int status = pthread_create(&threads[i], NULL, thread_runner, (void *)(intptr_t)i);
|
||||
int status = pthread_create(&threads[i], &attr, thread_runner, (void *)(intptr_t)i);
|
||||
if (status != 0) {
|
||||
printf("[*] Error creating thread %d - %d\n", i, status);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
pthread_attr_destroy(&attr);
|
||||
for (int i = 0; i < NUM_THREADS; i++ ) {
|
||||
pthread_join(threads[i], NULL);
|
||||
}
|
||||
|
@ -109,11 +109,18 @@ Java_TestNativeStack_triggerJNIStackTrace
|
||||
|
||||
warning = warn;
|
||||
|
||||
if ((res = pthread_create(&thread, NULL, thread_start, NULL)) != 0) {
|
||||
pthread_attr_t attr;
|
||||
pthread_attr_init(&attr);
|
||||
size_t stack_size = 0x100000;
|
||||
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);
|
||||
exit(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user