Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-988

100% CPU when using IoBuffer.shrink() method in some cases

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.8
    • Fix Version/s: 2.0.9
    • Component/s: None
    • Labels:
      None

      Description

      When one tries to shrink a buffer which minimal capacity is set to 0, and set the size to 0, it enter into an infinite loop.

      This is due to this loop :

              for (;;) {
                  if (newCapacity >>> 1 < minCapacity) {
                      break;
                  }
      
                  newCapacity >>>= 1;
              }
      
      

      Fixed with commit : 80af8c36890f7a25beb35fe01c2b62650414cf0e

      Thanks to Erick Lichtas for the report.

        Activity

        Hide
        elecharny Emmanuel Lecharny added a comment -

        Fixed with commit : 80af8c36890f7a25beb35fe01c2b62650414cf0e

        Thanks to Erick Lichtas for the report.

        Show
        elecharny Emmanuel Lecharny added a comment - Fixed with commit : 80af8c36890f7a25beb35fe01c2b62650414cf0e Thanks to Erick Lichtas for the report.

          People

          • Assignee:
            Unassigned
            Reporter:
            elecharny Emmanuel Lecharny
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development