8177958: Possible uninitialized char* in vm_version_solaris_sparc.cpp
Reviewed-by: shade, dholmes, kevinw
--- a/hotspot/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp Wed Apr 26 11:26:11 2017 -0700
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp Wed Apr 26 21:28:22 2017 -0700
@@ -404,7 +404,7 @@
// is available to us as well
Sysinfo cpu_info(SI_CPUBRAND);
bool use_solaris_12_api = cpu_info.valid();
- const char* impl;
+ const char* impl = "unknown";
int impl_m = 0;
if (use_solaris_12_api) {
impl = cpu_info.value();
@@ -431,7 +431,7 @@
kstat_close(kc);
}
}
- assert(impl_m != 0, "Unknown CPU implementation %s", impl);
+ assert(impl_m != 0, "Unrecognized CPU implementation: %s", impl);
features |= impl_m;
bool is_sun4v = (features & sun4v_m) != 0;