RFR: 8263185: Mallinfo deprecated in glibc 2.33

Thomas Stuefe stuefe at openjdk.java.net
Fri Mar 12 14:58:06 UTC 2021


On Fri, 12 Mar 2021 14:39:16 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.
>
> Hi Chris,
> 
> are you sure this is true? That we are unable to run on machines with older glibcs than the build machine uses? This is new to me. 
> 
> If this is not true, I would dynamically resolve mallinfo2. This is too unimportant a functionality to introduce a hard glibc dependency.
> 
> Minor remarks inline.
> 
> ..Thomas

Also please make sure you test on both new and old glibc and run some manual sanity tests. E.g. by connecting to a running VM via jcmd and executing VM.info. The output should appear somewhere in there, and match your expectations. The sign extension issue should have appeared when running on an older glibc with 50% probability as an unseemingly high value.

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

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


More information about the hotspot-runtime-dev mailing list