RFR: 8263185: Mallinfo deprecated in glibc 2.33 [v4]

Christoph Göttschkes cgo at openjdk.java.net
Wed Mar 17 11:25:50 UTC 2021


On Wed, 17 Mar 2021 10:22:12 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>>>> As I wrote before, I don't see a reason to resolve mallinfo dynamically.
>>> 
>>> Doesn't statically using mallinfo trigger the warning that we are trying to avoid?
>> 
>> Yes, that's why I resolve it dynamically. Otherwise we would need to use a GCC pragma to disable deprecation warnings locally.
>
>> > > As I wrote before, I don't see a reason to resolve mallinfo dynamically.
>> > 
>> > 
>> > Doesn't statically using mallinfo trigger the warning that we are trying to avoid?
>> 
>> Yes, that's why I resolve it dynamically. Otherwise we would need to use a GCC pragma to disable deprecation warnings locally.
> 
> How high is the chance that this API will ever be removed for real? Has any API ever been removed from the glibc (serious question)? If the chance is low or zero I'd prefer the runtime loader to resolve my functions for me (so, pragma).

I don't know how glibc handles this, but the release notes of 2.33 states:

> The deprecated <sys/vtimes.h> header and the function vtimes have been removed.

So it looks like they are removing deprecated functions. I guess this doesn't mean that the symbol is no longer in the runtime library (because of symbol versioning, it should remain there), but the function declaration in the header has been removed.

I can confirm, that on a recent Arch Linux (which already has glibc 2.33) this header is no longer to be found in /usr/include. In the libc.so file, however, the symbol is still there:

$ readelf --dyn-sym -W /usr/lib/libc.so.6 |grep vtimes
   673: 00000000000f5c40    56 FUNC    GLOBAL DEFAULT   16 vtimes at GLIBC_2.2.5

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

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


More information about the hotspot-runtime-dev mailing list