RFR(M): 8139040: Fix initializations before ShouldNotReachHere()

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Fri Oct 9 13:00:08 UTC 2015


Hi Thomas,

Thanks for your review, I appreciate your proposed changes!
I fixed the code accordingly:
http://cr.openjdk.java.net/~goetz/webrevs/8139040-init/webrev.01/

Best regards,
  Goetz.


From: Thomas Stüfe [mailto:thomas.stuefe at gmail.com]
Sent: Freitag, 9. Oktober 2015 11:10
To: Lindenmaier, Goetz
Cc: hotspot-runtime-dev at openjdk.java.net
Subject: Re: RFR(M): 8139040: Fix initializations before ShouldNotReachHere()

Hi Goetz,

some nitpicks:

http://cr.openjdk.java.net/~goetz/webrevs/8139040-init/webrev.00/src/share/vm/c1/c1_Canonicalizer.cpp.sdiff.html

maybe add default: ShouldNotReachHere to the case?

----

http://cr.openjdk.java.net/~goetz/webrevs/8139040-init/webrev.00/src/share/vm/ci/ciObjectFactory.cpp.sdiff.html

metadata_owner_klass can never be NULL here because fatal() in unconditional. If coverity is not smart enough to get that, how about adding a fake return after the call to fatal() instead of paying for the NULL check every time?

---

http://cr.openjdk.java.net/~goetz/webrevs/8139040-init/webrev.00/src/share/vm/opto/superword.cpp.sdiff.html

we initialize one pointer with 0, the other with NULL?

---

Apart from that, the rest is fine.

Regards Thomas


On Wed, Oct 7, 2015 at 3:22 PM, Lindenmaier, Goetz <goetz.lindenmaier at sap.com<mailto:goetz.lindenmaier at sap.com>> wrote:
Hi,

SAP requires us to fix a row of issues in the hotspot coding.  I would like
to share these with openJDK.

This webrev fixes a row of missing intializations, mostly combined with ShouldNotReachHere()
in default cases of switches or the like.
http://cr.openjdk.java.net/~goetz/webrevs/8139040-init/webrev.00/

In the debug build, ShouldNotReachHere() can be suppressed, so the uninitialized value actually can cause problems.
In opt builds, not all tools recognize the ShouldNotReachHere properly.

In addition to this I would like to add -Wuninitialized to the warning flags.
This finds most of these issues in the opt build and
would require an additional 70 fixes plus fixes in jvmtiEnter.xsl.
Would it be appreciated to set this flag?

Best regards,
  Goetz.





More information about the hotspot-runtime-dev mailing list