RFR: JDK-8334217 : [AIX] Misleading error messages after JDK-8320005
Joachim Kern
jkern at openjdk.org
Wed Jun 26 10:00:11 UTC 2024
On Tue, 25 Jun 2024 15:39:53 GMT, Suchismith Roy <sroy at openjdk.org> wrote:
> dll_load_library() call fails is not analyzed (the ebuf content is ignored)
> dll_load_library does not analyze the contents of ebuf which leads to misleading error message when library loading fails.
>
> We now call the second dll_load_library() only if the first returns with a 'No such file or directory' error message.
> If the first dll_load_library() found the library is not able to load it by any reason, we do not try again with a .a extension.
> [JDK-8334217](https://bugs.openjdk.org/browse/JDK-8334217)
src/hotspot/os/aix/os_aix.cpp line 1054:
> 1052: // If the load fails,we try to reload by changing the extension to .a for .so files only.
> 1053: // Shared object in .so format dont have braces, hence they get removed for archives with members.
> 1054: if (strstr(ebuf, "No such file or directory") != nullptr && result == nullptr && pointer_to_dot != nullptr && strcmp(pointer_to_dot, old_extension) == 0) {
I would switch the first condition with the second. First check if dll_load_library was not successful and then (if not successful) test the error code.
`if (result == nullptr && strstr(ebuf, "No such file or directory") != nullptr && .....`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19887#discussion_r1654504200
More information about the hotspot-runtime-dev
mailing list