[9] RFR: 8175345: possible null pointer dereference defects

Rahul Raghavan rahul.v.raghavan at oracle.com
Wed Mar 8 06:53:42 UTC 2017


Please review following patch proposal to avoid 
possible null pointer dereference warnings / errors for internal tests.

<webrev.01> - http://cr.openjdk.java.net/~rraghavan/8175345/webrev.01/

<jbs> - internal bug - https://bugs.openjdk.java.net/browse/JDK-8175345

-- Possible null-pointer-deref type issues reported with Internal tests 
due to the case that "Function MultiNode::proj_out may return constant 'NULL'"

Already following type checks are in place -
.e.g.: [hotspot/src/share/vm/opto/multnode.cp]
      bool ProjNode::is_uncommon_trap_if_pattern(Deoptimization::DeoptReason reason) {

          ProjNode* other_proj = iff->proj_out(1-_con);
          if (other_proj == NULL) // Should never happen..
            return false;

So required explicit checks added at following reported locations in <webrev.01>,
      - IfNode::dominated_by - hotspot/src/share/vm/opto/ifnode.cpp
      - StringConcat::validate_control_flow - hotspot/src/share/vm/opto/stringopts.cpp
      - PhaseIdealLoop::intrinsify_fill - hotspot/src/share/vm/opto/loopTransform.cpp
      - CallNode::may_modify - hotspot/src/share/vm/opto/callnode.cpp

-- Found all valid reported defects issues with internal tests are indirectly related to above.
-- Confirmed no issues with testing -  jprt run (-testset hotspot).


More information about the hotspot-compiler-dev mailing list