[
https://issues.apache.org/jira/browse/IGNITE-3809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15454919#comment-15454919
]
ASF GitHub Bot commented on IGNITE-3809:
----------------------------------------
GitHub user shroman opened a pull request:
https://github.com/apache/ignite/pull/1017
IGNITE-3809: Fix for ArrayIndexOutOfBoundsException in GridUnsafeLru.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/shroman/ignite ignite-3809
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/1017.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1017
----
commit ad91f65d804134f2fd25fc42ebc98610948785d3
Author: shtykh_roman <[email protected]>
Date: 2016-09-01T09:41:20Z
IGNITE-3809: ArrayIndexOutOfBoundsException in GridUnsafeLru.
----
> 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
> Assignee: Roman Shtykh
> 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:
> {code}
> return lrus[U.safeAbs(addIdx.getAndIncrement()) % cnt].offer(part, addr,
> hash);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)