RFR (M) 8191521: handle long relative path specified in -Xbootclasspath/a on windows

Calvin Cheung calvin.cheung at oracle.com
Thu Jul 25 23:15:22 UTC 2019

On 7/25/19 8:08 AM, Schmelter, Ralf wrote:
> Hi Calvin,
> thanks for reviewing this change.
>> 4315       } else {
>> 4316         prefix = L"\\\\?\\UNC";
>> 4317         prefix_off = 1; // Overwrite the first char with the prefix.
>> 4318       }
>> Do you mean if the original path is something like "\\\\x\\y", it would
>> become the following?
>>      ""\\\\?\\UNC\\x\\y"
> Exactly. Usually you can just add a prefix, but in case of the an UNC path,
> the double backslash must be changed to a single one.
>> Maybe add an example in the comment?
> Good idea.
>> 4368   if (err != ERROR_SUCCESS) {
>> 4369     os::free(result);
>> I think you need a NULL check on result before calling os::free()
>> because result could be NULL if the os::malloc() call at line 4328 has
>> failed.
> os::free() is like ::free() and delete. You can call them with NULL,
> which is just treated as a no-op.
>> line 4282 please add a blank space before "The"
>> line 4283 "er" should be "err"
> Good catch.
>> Could you also mention that the function is based on pathToNTPath() in
>> io_util_md.cpp?
> OK.
>> I haven't reviewed this file in details but I have tried your patch and
>> saw failures in tier1 testing.
> That's interesting. Do you only see the errors with UNC paths?

I'm not sure. Most errors with path begins with "\\\\localhost\\T$\\..."

A few errors with path begins with "//\\/\\localhost\\T$\\..."

or "\\\\/\\\\localhost\\\\/\\T$..."

>   If yes,
> could you open the 'Computer Management' application and look at
> 'System Tools' -> 'Shared Folders' -> 'Shares'. Usually if you have
> a harddrive at let's say D:, windows will create a share called D$.
> I've used this to check UNC paths, but the share might be missing.
> Especially if T: is not a harddrive but a mapped drive.
I don't have direct access to the windows machine but I was told that T: 
is mapped to some folder in the C: drive using 'subst' such as 'subst T: 
> I should probably first test, if a can access the \\localhost\<DRIVELETTER>$
> share at all and only then run the UNC path tests.

Sounds good.



> Best regards,
> Ralf

More information about the hotspot-runtime-dev mailing list