8134538: Duplicate implementations of os::lasterror
David Holmes
david.holmes at oracle.com
Tue Jul 3 21:19:40 UTC 2018
Hi Patricio,
Not that you need another review, but this looks good to me too. :)
Aside: it seems to me that the only non-Windows use of os::lasterror may
actually be incorrect:
_file = fopen(file, "r");
_line_no = 0;
_interfaces = new (ResourceObj::C_HEAP, mtClass)
GrowableArray<int>(10, true);
if (_file == NULL) {
char errmsg[JVM_MAXPATHLEN];
os::lasterror(errmsg, JVM_MAXPATHLEN);
vm_exit_during_initialization("Loading classlist failed", errmsg);
}
'errno' from the fopen may have been overwritten inside the allocation
logic (particularly if logging is enabled) by the time we call
os::lasterror.
Cheers,
David
On 4/07/2018 1:15 AM, patricio.chilano.mateo at oracle.com wrote:
> Hi all,
>
> Could you please review this small change?
>
> Summary: Identical Linux, BSD, Solaris and AIX implementations of
> os::lasterror were replaced with a single os_posix one.
>
> Bug URL: https://bugs.openjdk.java.net/browse/JDK-8134538
> Webrev
> URL:http://cr.openjdk.java.net/~coleenp/8134538.01/webrev/index.html
> <http://cr.openjdk.java.net/%7Ecoleenp/8134538.01/webrev/index.html>
>
> The fix was tested with Mach5 on tiers 1-5 on all platforms.
>
> Thanks,
> Patricio
More information about the hotspot-runtime-dev
mailing list