JDK-7192963 : assert(_in[req-1] == this) failed: Must pass arg count to 'new'
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs24
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-08-21
  • Updated: 2013-08-01
  • Resolved: 2012-08-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 7 JDK 8 Other
7u40Resolved 8Fixed hs24Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Regression after 6340864 changes:

# A fatal error has been detected by the Java Runtime Environment:
#  Internal Error (C:\jprt\T\P1\170446.vkozlov\s\src\share\vm\opto\node.cpp:326), pid=8864, tid=5688
#  assert(_in[req-1] == this) failed: Must pass arg count to 'new'

The fix was integrated in first HS24-based build of JDK 7. The initial issue was caused by changes in the same build it was fixed in, so there is no way to reproduce it in any promoted build of JDK 8. Closed as not verified (setup not available).

EVALUATION An other variant of shifts with loop variant counts: "a[i]=1<<i;". C2 tried to create PackINode for this case and failed because that code was broken. Pack nodes are not supported (there are no Mach nodes) so the code was not tested before. There is code in SuperWord::profitable() method which check for cases where Pack node is needed and skip such vectorization. But it does not check it for shift node count edge since it does not expect vector input for it. The fix is to not vectorize shift instructions if count is not the same for all shifts and if count is vector. Note, I removed the changes for previous 7192964 fix since it was not precise and current fix cover 7192964 case (I verified). Also fixed Pack node generation, number of inputs should be 2 at the creation otherwise it gives the bug's assert. I did some refactoring. Moved and renamed SuperWord::vector_opd_range() to VectorNode::vector_operands(). Opcode checks of supported nodes are done in vectornode.cpp. Also this method was incorrect - it had only one LShiftI opcode listed. And I added other supported nodes.

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/5af51c882207

EVALUATION Incorrect code which creates PackNode.