You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2014/09/26 12:14:33 UTC

[jira] [Created] (DIRMINA-988) 100% CPU when using IoBuffer.shrink() method in some cases

Emmanuel Lecharny created DIRMINA-988:
-----------------------------------------

             Summary: 100% CPU when using IoBuffer.shrink() method in some cases
                 Key: DIRMINA-988
                 URL: https://issues.apache.org/jira/browse/DIRMINA-988
             Project: MINA
          Issue Type: Bug
    Affects Versions: 2.0.8
            Reporter: Emmanuel Lecharny
            Priority: Blocker
             Fix For: 2.0.9


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 :

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

            newCapacity >>>= 1;
        }

{code}

Fixed with commit : 80af8c36890f7a25beb35fe01c2b62650414cf0e

Thanks to Erick Lichtas for the report.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)