CDC-HI bug #6414216 is a result of a bug in javatest. The CDC TCK exceptions03103.java test intentionally is recursive until a StackOverflowError is reached. On each recursive call, it does a out.println, with data like the following:
...
Test at depth 3216
Test at depth 3217
Test at depth 3218
Test at depth 3219
Test at depth 3220
Test at depth 3221
Test at depth 3222
Test at depth 3223
...
The out.println call eventually ends up in AgentWriter.write(int ch), which does the following:
public synchronized void write(int ch) throws IOException {
buf[count++] = (char)ch;
if (count == buf.length) {
parent.sendChars(type, buf, 0, count);
count = 0;
}
}
Because the TCK test is trying to force a StackOverflowError, there is a very good chance that one can happen during the call to parent.sendChars. If it does, then count is never reset to 0, so the next time write(int ch) is called you get an ArrayIndexOutOfBoundsException. count should be reset to 0 before the sendChars() call.
...
Test at depth 3216
Test at depth 3217
Test at depth 3218
Test at depth 3219
Test at depth 3220
Test at depth 3221
Test at depth 3222
Test at depth 3223
...
The out.println call eventually ends up in AgentWriter.write(int ch), which does the following:
public synchronized void write(int ch) throws IOException {
buf[count++] = (char)ch;
if (count == buf.length) {
parent.sendChars(type, buf, 0, count);
count = 0;
}
}
Because the TCK test is trying to force a StackOverflowError, there is a very good chance that one can happen during the call to parent.sendChars. If it does, then count is never reset to 0, so the next time write(int ch) is called you get an ArrayIndexOutOfBoundsException. count should be reset to 0 before the sendChars() call.
- relates to
-
JDK-8020273 vm/concepts/exceptions/exceptions031/exceptions03103/exceptions03103.html failed in JCK8-b18 QAC test cycle
- Closed