RFR: Handle confstr version lookup failures gracefully
David Holmes
david.holmes at oracle.com
Wed Apr 12 01:27:09 UTC 2017
On 12/04/2017 10:00 AM, Mikael Vidstedt wrote:
>
> During bootstrapping, os::Linux::libpthread_init() tries to discover the versions of (g)libc and libpthread respectively. This is done using confstr(3). However, musl doesn’t implement support for version discovery, so confstr will return 0/EINVAL.
>
> This change makes the code handle confstr failures gracefully, and defaults using the string “unknown” if the version information cannot be looked up.
>
> http://cr.openjdk.java.net/~mikael/webrevs/portola/glibcversion/webrev.01/hotspot/webrev/
There was no need to separate out the declaration here:
504 size_t n;
505
506 n = confstr(_CS_GNU_LIBC_VERSION, NULL, 0);
Overall I don't think this change is quite what we would want in that it
is wrong to print "unknown" when in fact there is no libc (or
libpthread?) involved. And we would surely want to see that we are using
musl.
Thanks,
David
> Cheers,
> Mikael
>
More information about the portola-dev
mailing list