Integrated: 8264684: os::get_summary_cpu_info padded with spaces
Afshin Zafari
duke at openjdk.org
Thu Jan 12 01:57:22 UTC 2023
On Tue, 10 Jan 2023 09:46:34 GMT, Afshin Zafari <duke at openjdk.org> wrote:
> ### Description
> Issue: There are some padded spaces in Host info strings in JVM's outputs on Windows platforms.
> Reason:
> In Windows, the strings read from Registry entries may be shorter than the buffer given to the API to fill in. In these cases, the actual size is written to the `size` parameter by the API.
>
> ### Patch
> The given buffer is null terminated at the position of the returned `size`, if it is not longer than the buffer length.
>
> ### Tests
> local: linux-x64 some tests that crashed and wrote the Host info using the changed code.
> mach5: tier1-5
This pull request has now been integrated.
Changeset: af8d3fb2
Author: Afshin Zafari <afshin.zafari at oracle.com>
Committer: Ioi Lam <iklam at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/af8d3fb21ab59104d49bd664f634399fb72ecbd2
Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod
8264684: os::get_summary_cpu_info padded with spaces
Reviewed-by: iklam, ccheung
-------------
PR: https://git.openjdk.org/jdk/pull/11920
More information about the hotspot-runtime-dev
mailing list