RFR: JDK-8320005 : Allow loading of shared objects with .a extension on AIX [v22]
Thomas Stuefe
stuefe at openjdk.org
Thu Feb 15 08:18:09 UTC 2024
On Mon, 12 Feb 2024 18:04:21 GMT, Suchismith Roy <sroy at openjdk.org> wrote:
>> J2SE agent does not start and throws error when it tries to find the shared library ibm_16_am.
>> After searching for ibm_16_am.so ,the jvm agent throws and error as dll_load fails.It fails to identify the shared library ibm_16_am.a shared archive file on AIX.
>> Hence we are providing a function which will additionally search for .a file on AIX ,when the search for .so file fails.
>
> Suchismith Roy has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove not matched trailing whitespaces
Hi,
some remarks:
- there is no need for a copy for the first call to dll_load_library. Just hand in the string 1:1.
- I would only do the *.a fallback loading if the error indicates that the *.so file had not been there. So, only if EACCESS or ENOENT; in all other cases I would not do the fallback. E.g. if the *.so file cannot be loaded due to a header mismatch. See https://www.ibm.com/docs/en/aix/7.1?topic=l-load-loadandinit-subroutines
- Please use os::strdup.
- Please assert that the replacement string is smaller than the original string (which it should be, *.so is longer than *.a, but this is insurance against anyone changing the code in the future)
Thank you, Thomas
-------------
Changes requested by stuefe (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/16604#pullrequestreview-1882051726
More information about the serviceability-dev
mailing list