You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Roman Shtykh (JIRA)" <ji...@apache.org> on 2016/09/01 09:38:21 UTC
[jira] [Commented] (IGNITE-3809) ArrayIndexOutOfBoundsException in
GridUnsafeLru
[ https://issues.apache.org/jira/browse/IGNITE-3809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15454905#comment-15454905 ]
Roman Shtykh commented on IGNITE-3809:
--------------------------------------
http://apache-ignite-users.70518.x6.nabble.com/lt-default-gt-Unexpected-exception-during-cache-update-java-lang-ArrayIndexOutOfBoundsException-503-td7356.html
> 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)