RFR: JDK-8317919: pthread_attr_init handle return value and destroy pthread_attr_t object [v2]

David Holmes dholmes at openjdk.org
Mon Oct 16 02:35:15 UTC 2023


On Thu, 12 Oct 2023 14:31:19 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> Seems we miss on AIX and Linux the handling of pthread_attr_init return value and sometimes in special cases destroying the related pthread_attr_t object.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
> 
>   add pthread_attr_destroy to SplashCreateThread

Also note that this issue has been raised in the past, regarding the return value of `pthread_attr_init` but there was no need to make any change on Linux. From the manpage:

POSIX.1-2001 documents an ENOMEM error for pthread_attr_init(); on Linux these functions always succeed (but por‐
       table and future-proof applications should nevertheless handle a possible error return).

It is very unlikely that this would ever change so we have not made such a change in the past.

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

PR Comment: https://git.openjdk.org/jdk/pull/16147#issuecomment-1763632145


More information about the hotspot-runtime-dev mailing list