-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b06
-
generic
-
generic
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
In recent snapshot of OpenJDK 9, there is an potential buggy code in dev/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java
Code:
====
501 for (int i = 0; i < slotCount; i++) {
502 Object slotEntries = _variables.get(i);
503 if (slotEntries != null) {
504 if (slotEntries instanceof ArrayList) {
505 ArrayList slotList = (ArrayList) slotEntries;
506
507 for (int j = 0; j < slotList.size(); j++) {
508 allVarsEverDeclared.add(slotList.get(i));
509 }
510 } else {
511 allVarsEverDeclared.add(slotEntries);
512 }
513 }
514 }
====
In Line 508, should the indexer, i, of slotList.get(i) be j as i is the inner loop iterates by slotList.size()? It might be a trivial issue but wanted to report just in case. Thanks!
REPRODUCIBILITY :
This bug can be reproduced rarely.
A DESCRIPTION OF THE PROBLEM :
In recent snapshot of OpenJDK 9, there is an potential buggy code in dev/jaxp/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java
Code:
====
501 for (int i = 0; i < slotCount; i++) {
502 Object slotEntries = _variables.get(i);
503 if (slotEntries != null) {
504 if (slotEntries instanceof ArrayList) {
505 ArrayList slotList = (ArrayList) slotEntries;
506
507 for (int j = 0; j < slotList.size(); j++) {
508 allVarsEverDeclared.add(slotList.get(i));
509 }
510 } else {
511 allVarsEverDeclared.add(slotEntries);
512 }
513 }
514 }
====
In Line 508, should the indexer, i, of slotList.get(i) be j as i is the inner loop iterates by slotList.size()? It might be a trivial issue but wanted to report just in case. Thanks!
REPRODUCIBILITY :
This bug can be reproduced rarely.