From cbbfa0ddfb1485edfc6275dd7085b3096f7eccf6 Mon Sep 17 00:00:00 2001 From: Robbin Ehn Date: Wed, 13 Sep 2023 04:59:19 +0000 Subject: [PATCH] 8315652: RISC-V: Features string uses wrong separator for jtreg Reviewed-by: fyang, luhenry --- src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp b/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp index 454ffbb06d3..f9c52bf94fb 100644 --- a/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp +++ b/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp @@ -108,7 +108,7 @@ void VM_Version::setup_cpu_available_features() { char buf[1024] = {}; if (uarch != nullptr && strcmp(uarch, "") != 0) { // Use at max half the buffer. - snprintf(buf, sizeof(buf)/2, "%s,", uarch); + snprintf(buf, sizeof(buf)/2, "%s ", uarch); } os::free((void*) uarch); strcat(buf, "rv64"); @@ -122,13 +122,14 @@ void VM_Version::setup_cpu_available_features() { if (_feature_list[i]->feature_string()) { const char* tmp = _feature_list[i]->pretty(); if (strlen(tmp) == 1) { + strcat(buf, " "); strcat(buf, tmp); } else { // Feature string is expected to be lower case. // Turn Zxxx into zxxx char prebuf[3] = {}; assert(strlen(tmp) > 1, "Must be"); - prebuf[0] = '_'; + prebuf[0] = ' '; prebuf[1] = (char)tolower(tmp[0]); strcat(buf, prebuf); strcat(buf, &tmp[1]);