RFR: 8263185: Mallinfo deprecated in glibc 2.33

Christoph Göttschkes cgo at openjdk.java.net
Fri Mar 12 11:49:07 UTC 2021


On Fri, 12 Mar 2021 11:33:56 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Starting with glibc 2.33, mallinfo is deprecated in favor of the new mallinfo2 API. Both APIs work the same way, the only difference is, that mallinfo2 uses size_t instead of int for the fields of the struct, containing the information about malloc. Please see the [glibc release notes](https://sourceware.org/pipermail/libc-alpha/2021-February/122207.html).
>> 
>> Testing with tier1 on a system with glibc 2.33 and on a system with glibc 2.31.
>
> Would this not mean we fail to run a glibc 2.33+ built VM on a machine with an older glibc?

Yes. I was thinking about using dlsym to detect at runtime which functions are available.
But because of symbol versioning, I expect the runtime linker to fail linking the executable, if it requires a glibc 2.33 and the system only has a glibc with a lower version. This is already the case.
Or do you expect the linker to ignore symbol versioning? Are we supporting linux platforms which are not using it?

-------------

PR: https://git.openjdk.java.net/jdk/pull/2964


More information about the hotspot-runtime-dev mailing list