ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valentin Kulichenko (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-3809) ArrayIndexOutOfBoundsException in GridUnsafeLru
Date Tue, 30 Aug 2016 23:43:20 GMT
Valentin Kulichenko created IGNITE-3809:

             Summary: ArrayIndexOutOfBoundsException in GridUnsafeLru
                 Key: IGNITE-3809
                 URL: https://issues.apache.org/jira/browse/IGNITE-3809
             Project: Ignite
          Issue Type: Bug
          Components: cache
    Affects Versions: 1.7
            Reporter: Valentin Kulichenko
             Fix For: 1.8

{{GridUnsafeLru.offer(..)}} method uses atomic integer as a counter. In case of integer overflow
this method will throw {{ArrayIndexOutOfBoundsException}}.

We should use {{abs}} to avoid this. For example, like this:
return lrus[U.safeAbs(addIdx.getAndIncrement()) % cnt].offer(part, addr, hash);

This message was sent by Atlassian JIRA

View raw message