On Fri, 15 Dec 2023 06:22:39 GMT, Thomas Stuefe <stu...@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 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. > src/hotspot/os/aix/os_aix.cpp line 1132: > >> 1130: static const char* rtv_linkedin_libpath() { >> 1131: static char buffer[4096]; >> 1132: static const char* libpath = 0; > > If your intent is to return an empty buffer if there is no contained libpath, > I would just: > > > static const char* libpath = ""; > > then you can always just return libpath. But looking at the using code, returning NULL in case there is no contained libpath would be actually easier, see below. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16920#discussion_r1427609926 PR Review Comment: https://git.openjdk.org/jdk/pull/16920#discussion_r1427639138