RFR: 8240197: Cannot start JVM when $JAVA_HOME includes CJK characters
Yasumasa Suenaga
suenaga at oss.nttdata.com
Wed Mar 4 00:19:08 UTC 2020
Thanks Ralf!
I fixed them.
I need a Reviewer to push, so I uploaded new webrev:
http://cr.openjdk.java.net/~ysuenaga/JDK-8240197/webrev.03/
Yasumasa
On 2020/03/03 23:25, Schmelter, Ralf wrote:
> Hi Yasumasa,
>
> thanks for your work. The code should now be able to handle any path.
>
> Two small changes (no new webrev needed):
>
> size_t result_len = prefix_len + prefix_off + additional_space
> should be
> size_t result_len = prefix_len - prefix_off + additional_space
>
> And you should copy the prefix after you copied the filename, since sometimes the prefix is required to overwrite the start of the filename:
>
> // This call would be success because it is checked in above
> GetFullPathNameW(unicode_path, full_path_len, result + prefix_len - prefix_off, NULL);
> // Copy prefix
> memcpy(result, prefix, sizeof(WCHAR) * prefix_len);
>
> and
>
> // Copy unicode path
> memcpy(result + prefix_len - prefix_off, unicode_path, sizeof(WCHAR) * unicode_path_len);
> // Copy prefix
> memcpy(result, prefix, sizeof(WCHAR) * prefix_len);
>
> With these changes the os_windows gtest and the appcds jtreg tests run without errors.
>
> Best regards,
> Ralf
>
More information about the hotspot-runtime-dev
mailing list