RFR: JDK-8320890: [AIX] Find a better way to mimic dl handle equality [v4]
Joachim Kern
jkern at openjdk.org
Fri Dec 15 11:24:44 UTC 2023
On Fri, 15 Dec 2023 06:15:56 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Joachim Kern has updated the pull request incrementally with one additional commit since the last revision:
>>
>> followed the proposals
>
> src/hotspot/os/aix/os_aix.cpp line 1135:
>
>> 1133:
>> 1134: if (libpath)
>> 1135: return libpath;
>
> { }
done
> src/hotspot/os/aix/os_aix.cpp line 1137:
>
>> 1135: return libpath;
>> 1136:
>> 1137: char pgmpath[32+1];
>
> Will overflow if pid_t is 64bit. Give it a larger size; after all, you are giving buffer 4K above, so you are not overly concerned with saving stack space.
adopted. use buffer instead of pgmpath
> src/hotspot/os/aix/os_aix.cpp line 1146:
>
>> 1144: fread(buffer, 1, FILHSZ_64 + _AOUTHSZ_EXEC_64, f);
>> 1145:
>> 1146: if (((struct filehdr*)buffer)->f_magic == U802TOCMAGIC ) {
>
> as stated above, I don't think this section is needed.
Completely rewritten; Only xcoff64 handled
> src/hotspot/os/aix/os_aix.cpp line 1170:
>
>> 1168: else if (((struct filehdr*)buffer)->f_magic == U64_TOCMAGIC ) {
>> 1169: // __XCOFF64__
>> 1170: struct _S_(xcoffhdr) xcoff64;
>
> whats with the `_S_`?
Not needed any more, because only xcoff64 handled
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16920#discussion_r1427862523
PR Review Comment: https://git.openjdk.org/jdk/pull/16920#discussion_r1427862370
PR Review Comment: https://git.openjdk.org/jdk/pull/16920#discussion_r1427863562
PR Review Comment: https://git.openjdk.org/jdk/pull/16920#discussion_r1427864005
More information about the hotspot-dev
mailing list