JDK-8177958 : Possible uninitialized char* in vm_version_solaris_sparc.cpp
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9,10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris
  • CPU: sparc
  • Submitted: 2017-04-03
  • Updated: 2018-02-15
  • Resolved: 2017-04-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 8
10 b21Fixed 8u162Fixed
Related Reports
Relates :  
Description
In the file src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp
if kstat_open() fails here:

414     // Otherwise use kstat to determine the machine type.
415     kstat_ctl_t* kc = kstat_open();

..we may then use an uninitialized char* in the later assert:

434   assert(impl_m != 0, "Unknown CPU implementation %s", impl);



Comments
Yes, thanks for taking care of this Kevin.
04-04-2017

Okay, thank you!
04-04-2017

Martin noticed this when I was backporting a previous change, I said we'll take care of it.
04-04-2017

The assert was added by JDK-8165482. [~mwalsh], could you please have a look?
04-04-2017

ILW = Reading uninitialized char*, only with debug build on Solaris SPARC, no workaround = MLH = P4
04-04-2017

Good catch.
03-04-2017