RFR: JDK-8319516 - Native library suffix impact on the library loading in AIX- Java Class Loader [v11]

Mandy Chung mchung at openjdk.org
Fri Apr 5 16:21:12 UTC 2024


On Fri, 5 Apr 2024 08:58:34 GMT, Suchismith Roy <sroy at openjdk.org> wrote:

>> Allow support for both .a and .so files in AIX.
>> If .so file is not found, allow fallback to .a extension.
>> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516)
>
> Suchismith Roy has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - spaces
>  - nits and move file to aix directory

test/jdk/java/lang/RuntimeTests/loadLibrary/aix/LoadAIXLibraryFromArchiveObject.java line 28:

> 26:  * @bug 8319516
> 27:  * @requires os.family == "aix"
> 28:  * @run  main/othervm -Djava.library.path=/usr/lib LoadLibraryTestAIX

Suggestion:

 * @run main/othervm -Djava.library.path=/usr/lib LoadAIXLibraryFromArchiveObject

test/jdk/java/lang/RuntimeTests/loadLibrary/aix/LoadAIXLibraryFromArchiveObject.java line 33:

> 31: public class LoadAIXLibraryFromArchiveObject {
> 32:     public static void main(String[] args) throws Exception {
> 33:         String libraryName = "perfstat";

I suggest to check if `/usr/lib/libperstat.a` is present and `/usr/lib/libperfstat.so` is not present; otherwise, the test should throw RuntimeException.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17945#discussion_r1553959163
PR Review Comment: https://git.openjdk.org/jdk/pull/17945#discussion_r1553962707


More information about the core-libs-dev mailing list