Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7902870

Infinite loop in AgentServer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • None
    • tools
    • None
    • generic
    • generic

      In AgentServer.java, there is this piece of code:

               private void decode() throws IOException {
                   byteBuffer.flip();
                   CoderResult cr;
                   while ((cr = decoder.decode(byteBuffer, charBuffer, false)) != CoderResult.UNDERFLOW) {
                       writeCharBuffer();
                   }
                   byteBuffer.compact();
               }
      The while loop only exits if the decode() returns UNDERFLOW, which may not be true in some occasions, because the encoding used here and the output from the agent VM may differ, decode() may return malformed/unmapped error. Then it will become an infinite loop here.

            naoto Naoto Sato
            naoto Naoto Sato
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: