JDK-8046698 : assert(false) failed: only Initialize or AddP expected macro.cpp:943
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-06-12
  • Updated: 2015-01-21
  • Resolved: 2014-08-07
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 8 JDK 9
8u40Fixed 9 b28Fixed
Description
#  Internal Error (/space/rw140007/jdk9-repo/hotspot/src/share/vm/opto/macro.cpp:943), pid=25199, tid=17
#  assert(false) failed: only Initialize or AddP expected

when running CTW
Comments
ILW=Assert - bad consitency, very low, unconfirmed - turn of f loop unswitching =(M/H)LH=(P2/P4)=P3
13-06-2014

The answer to my question: only exception path from Allocate stays in the loop. Fall-through path (which is connected to Initialize node) is the exit from the loop. That is why Initialize node is outside the loop.
12-06-2014

Initialization node should stay together with Allocate. How it was separated?
12-06-2014

bugs happen when: 1- try block keeps Allocate node in loop while Initialization is outside the loop 2- loop unswitching clones Allocate and add Phi to merge the result of Allocate nodes as input to the Initialization CallNode::result_cast() return NULL because it doesn't expect a Phi, the allocation elimination code then assumes there's no use for the allocation when there's still one.
12-06-2014

Could be related to 8042786 because it is passed with -XX:-EliminateAutoBox
12-06-2014