Re: The default java.library.path on Linux does not include the library paths in the mulitarch-spec

2024-01-08 Thread Florian Weimer
* Glavo: > I wish OpenJDK would parse the /etc/ld.so.conf to get the full library > path list so it would be consistent with the behavior of ld. Can > anyone consider this suggestion? Parsing /etc/ld.so.conf is the wrong approach. Even glibc itself does not look at that file at run time, it's

Re: The default java.library.path on Linux does not include the library paths in the mulitarch-spec

2024-01-05 Thread Glavo
> > As for Panama, note that the SymbolLookup API allows a better way to > load system libraries, with its SymbolLookup::libraryLookup factory: > > >

Re: The default java.library.path on Linux does not include the library paths in the mulitarch-spec

2024-01-05 Thread Maurizio Cimadamore
Hi Glavo, parsing ld.conf is something that some frameworks do (e.g. JNR). Last time I checked there was some concerns in having hotspot bootstrap code depending on the results of an external tool, whose output could change over time. Currently, IIRC the list of path is just a compiler

Re: The default java.library.path on Linux does not include the library paths in the mulitarch-spec

2024-01-04 Thread David Holmes
On 5/01/2024 12:24 am, Glavo wrote: I expect there are security reasons why the JDK tries to find the file itself in these specific paths, rather than letting the platform code search for it. I think this should have nothing to do with security. If there is a vulnerability in the

Re: The default java.library.path on Linux does not include the library paths in the mulitarch-spec

2024-01-04 Thread Glavo
> > I expect there are security reasons why the JDK tries to find > the file itself in these specific paths, rather than letting the > platform code search for it. > I think this should have nothing to do with security. If there is a vulnerability in the platform code, there is nothing the JDK

Re: The default java.library.path on Linux does not include the library paths in the mulitarch-spec

2024-01-03 Thread David Holmes
On 4/01/2024 1:36 pm, Glavo wrote: Hey David, AFAICS java.library.path (and sun.boot.library.path) are input properties that can be set by the user. There are no "default" values for these properties as such. Although they can be set by the user, they have default values. For

Re: The default java.library.path on Linux does not include the library paths in the mulitarch-spec

2024-01-03 Thread Glavo
Hey David, > AFAICS java.library.path (and sun.boot.library.path) are input > properties that can be set by the user. There are no "default" values > for these properties as such. > Although they can be set by the user, they have default values. For Linux, the default value is set here:

Re: The default java.library.path on Linux does not include the library paths in the mulitarch-spec

2024-01-01 Thread David Holmes
Hi Glavo, On 24/12/2023 4:18 am, Glavo wrote: Hi, There are already many Linux distributions that are following the multiarch-spec[1] and adding the following paths to the default library path list: * /usr/local/lib/ * /lib/ * /usr/lib/ But OpenJDK doesn't add these paths to the

The default java.library.path on Linux does not include the library paths in the mulitarch-spec

2023-12-23 Thread Glavo
Hi, There are already many Linux distributions that are following the multiarch-spec[1] and adding the following paths to the default library path list: - /usr/local/lib/ - /lib/ - /usr/lib/ But OpenJDK doesn't add these paths to the java.library.path by default, so