Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8312596

Null pointer access in Compile::TracePhase::~TracePhase after JDK-8311976

XMLWordPrintable

    • b09

      SonarCloud reports a new warning here: "_compile" can be NULL on this path:

      ```
      Compile::TracePhase::~TracePhase() {
      #ifdef ASSERT
        if (PrintIdealNodeCount) {
          tty->print_cr("phase name='%s' nodes='%d' live='%d' live_graph_walk='%d'",
                        _phase_name, _compile->unique(), _compile->live_nodes(), _compile->count_live_nodes_by_graph_walk());
        }
      ```

      I think it is a regression since JDK-8311976.

      This is minor, would only manifest in debug builds, but would be good to fix anyway.

            asmehra Ashutosh Mehra
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: