United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7192963 assert(_in[req-1] == this) failed: Must pass arg count to 'new'
JDK-7192963 : assert(_in[req-1] == this) failed: Must pass arg count to 'new'

Details
Type:
Bug
Submit Date:
2012-08-21
Status:
Closed
Updated Date:
2013-08-01
Project Name:
JDK
Resolved Date:
2012-08-27
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs24
Fixed Versions:
hs24 (b21)

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Relates:
Relates:
Relates:

Sub Tasks

Description
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'
#

                                    

Comments
EVALUATION

Incorrect code which creates PackNode.
                                     
2012-08-21
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/5af51c882207
                                     
2012-08-22
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).
                                     
2013-08-01
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.
                                     
2012-08-22



Hardware and Software, Engineered to Work Together