RFR: JDK-8303549: [AIX] TestNativeStack.java is failing with exit value 1 [v2]
Varada M
duke at openjdk.org
Tue Jun 6 18:53:24 UTC 2023
On Wed, 31 May 2023 15:38:40 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> Varada M has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>
>> - stack size added
>> - Merge remote-tracking branch 'upstream/master' into test_native_stack
>> - Added stack size
>
> test/hotspot/jtreg/runtime/jni/getCreatedJavaVMs/exeGetCreatedJavaVMs.c line 98:
>
>> 96: size_t stack_size = 0x100000;
>> 97: pthread_attr_setstacksize(&attr, stack_size);
>> 98: int status = pthread_create(&threads[i], &attr, thread_runner, (void *)(intptr_t)i);
>
> In real world app, we should use `pthread_attr_destroy(&attr)` after we no longer need it, but in this test it's no big deal (hopefully anyone reading this code will not stop here and learn to leak that resource).
Thanks @gerard-ziemski and @dholmes-ora for the suggestion. I have included `pthread_attr_destroy(&attr)`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14209#discussion_r1220152153
More information about the hotspot-runtime-dev
mailing list