RFR: JDK-8303549: [AIX] TestNativeStack.java is failing with exit value 1 [v2]

David Holmes dholmes at openjdk.org
Wed May 31 21:35:10 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).

Yes including the destroy would be good code hygiene.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14209#discussion_r1212337792


More information about the hotspot-runtime-dev mailing list