RFR(XS): 8231885: Fix/remove malformed assert in os_windows.cpp

Langer, Christoph christoph.langer at sap.com
Fri Oct 4 14:02:38 UTC 2019


Thanks Dan. I'll probably push it only next week, though.

Cheers
Christoph

> -----Original Message-----
> From: Daniel D. Daugherty <daniel.daugherty at oracle.com>
> Sent: Freitag, 4. Oktober 2019 15:56
> To: Langer, Christoph <christoph.langer at sap.com>; hotspot-runtime-
> dev at openjdk.java.net
> Subject: Re: RFR(XS): 8231885: Fix/remove malformed assert in
> os_windows.cpp
> 
> Thumbs up. This is a trivial fix and only requires 1 (R)eviewer and does
> not need to wait 24 hours.
> 
> Dan
> 
> 
> On 10/4/19 9:27 AM, Langer, Christoph wrote:
> > Hi,
> >
> > please review a one(two)-line fix for a recent change in os_windows.cpp.
> >
> > The fix introduced a malformed assertion which doesn't provide an
> assertion message. Testing in jdk/jdk wouldn't bring up the issue but I just
> discovered it when attempting to backport it to jdk11. Probably due to the
> older compiler or some other thing that is different there the fastdebug build
> failed.
> >
> > One could add a message to the assertion. But I think handing a malformed
> path that starts with 3 or more '\' to wide_abs_unc_path will either cause an
> error code and the caller should be able to cope with that or windows is
> tolerant enough to accept it as a UNC path still. We can leave that to the
> operating system. So I decided to simply remove the assertion.
> >
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8231885
> > Problematic statement:
> http://hg.openjdk.java.net/jdk/jdk/file/13f29c43b6c7/src/hotspot/os/windo
> ws/os_windows.cpp#l4192
> >
> > Fix:
> >
> > diff -r e25b317d0350 -r 3f89a4aa0c2d
> src/hotspot/os/windows/os_windows.cpp
> > --- a/src/hotspot/os/windows/os_windows.cpp     Thu Oct 03 18:59:56 2019
> +0100
> > +++ b/src/hotspot/os/windows/os_windows.cpp     Fri Oct 04 14:11:47 2019
> +0100
> > @@ -4189,8 +4189,6 @@
> >       if (::isalpha(buf[0]) && !::IsDBCSLeadByte(buf[0]) && buf[1] == ':' &&
> buf[2] == '\\') {
> >         prefix = L"\\\\?\\";
> >       } else if (buf[0] == '\\' && buf[1] == '\\') {
> > -      assert(buf[2] != '\\');
> > -
> >         if (buf[2] == '?' && buf[3] == '\\') {
> >           prefix = L"";
> >           needs_fullpath = false;
> >
> >
> > Thanks
> > Christoph
> >



More information about the hotspot-runtime-dev mailing list