RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v4]
Joachim Kern
jkern at openjdk.org
Fri Dec 15 09:59:40 UTC 2023
On Fri, 15 Dec 2023 06:44:03 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> src/hotspot/os/aix/os_aix.cpp line 1129:
>>
>>> 1127:
>>> 1128: // get the library search path burned in to the executable file during linking
>>> 1129: // If the libpath cannot be retrieved return an empty path
>>
>> This is new. Is this complexity needed, if yes, why? Don't see a comment, may have missed it.
>
> Also, why are we parsing xcoff32 headers in there? AIX OpenJDK will always be 64-bit. So, you can replace the whole xcoff32 section with assert( f_magic == U802TOCMAGIC, ..). The function becomes a lot simpler then.
I found a leak in my previous implementation. It is more or less academical, but this solution is the complete one. I would prefer this complete solution even it is complex, because if dlopen follows a slightly different algorithm in resolving the library we surely get into trouble.
If we omit the xcoff32 we have to ensure that no xcoff32 executable file comes into play.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16920#discussion_r1427782107
More information about the serviceability-dev
mailing list