You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2015/04/13 09:20:12 UTC

[jira] [Resolved] (LUCENE-6409) LongBitSet.ensureCapacity overflows on numBits > Integer.MaxValue

     [ https://issues.apache.org/jira/browse/LUCENE-6409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrien Grand resolved LUCENE-6409.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 5.2
                   Trunk

Thanks Luc, I committed your changes. Let's have another JIRA issue to ensure that bits beyond {{numBits}} remain clear as you suggested?

>  LongBitSet.ensureCapacity overflows on numBits > Integer.MaxValue 
> -------------------------------------------------------------------
>
>                 Key: LUCENE-6409
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6409
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/other
>            Reporter: Luc Vanlerberghe
>             Fix For: Trunk, 5.2
>
>
> LongBitSet.ensureCapacity calculates the number of longs required to store the number of bits correctly and allocates a long[] accordingly, but then shifts the array length (which is an int!) left by 6 bits.  The int should be cast to long *before* performing the shift.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org