RFR: 8240197: Cannot start JVM when $JAVA_HOME includes CJK characters
Schmelter, Ralf
ralf.schmelter at sap.com
Tue Mar 3 14:25:23 UTC 2020
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