On Wed, 20 Dec 2023 14:30:18 GMT, Thomas Stuefe <stu...@openjdk.org> wrote:
> Hi, > > some requests and questions: > > * Please modify the JBS title, PR title, and JBS issue text to reflect that > this adds an alternative shared object loading path for shared objects on > AIX. Something like "Allow loading shared objects with .a extension on AIX". > Please describe the new logic in the JBS issue text. > * Does this really have to be handled in the OpenJDK? What does J9 on AIX do? > Could this be done in a simpler way outside OpenJDK, e.g. by providing an > *.so variant of the library in question? Where does this library come from? > * What happens if we accidentally attempt to load a "real" static library, > which is also named *.a? Would dlopen() then crash? What would happen? > * What happens if the original path handed to os::dll_load is already a *.a > file? Should the logic then be reversed? > * We really need regression tests for this. For some of the question I need to consult the folk working on J9. I will answer a few of them if that gives some clarity. > * Please modify the JBS title, PR title, and JBS issue text to reflect that > this adds an alternative shared object loading path for shared objects on > AIX. Something like "Allow loading shared objects with .an extension on AIX". > Please describe the new logic in the JBS issue text. Sure working on it. > * Does this really have to be handled in the OpenJDK? What does J9 on AIX do? > Could this be done in a simpler way outside OpenJDK, e.g. by providing an > *.so variant of the library in question? Where does this library come from? I am not sure how J9 handles this. I would have to consult . However as per current observation, this issue does not show up on Semuru. This issue is only happening on Adoptium. The team that release these file has always released *.a files which work fine for Semuru. > * What happens if we accidentally attempt to load a "real" static library, > which is also named *.a? Would dlopen() then crash? What would happen? I don't think the problem is with *.a . They would load as the default behaviour of the dlopen. It is only when the dlopen fails for *.so , we give another chance to check for .a file with the same name. > * What happens if the original path handed to os::dll_load is already a *.a > file? Should the logic then be reversed? I don't think so. We are not modifying the behaviour to handle *.a files here. We are just adding extra checks for *.so files if they fail to load. In the logic , when a load fails, I just check if it is a .so file and perform the loading again. ------------- PR Comment: https://git.openjdk.org/jdk/pull/16604#issuecomment-1865837275