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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.0.8
    • 2.0.9
    • None
    • 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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              elecharny Emmanuel L├ęcharny
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: