cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taylan Develioglu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-5903) Integer overflow in OffHeapBitSet when bloomfilter > 2GB
Date Tue, 20 Aug 2013 08:34:51 GMT

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

Taylan Develioglu updated CASSANDRA-5903:
-----------------------------------------

    Description: 
In org.apache.cassandra.utils.obs.OffHeapBitSet.

byteCount overflows and causes an IllegalArgument exception in Memory.allocate when bloomfilter
is > 2GB.

Suggest changing byteCount to long.

{code:title=OffHeapBitSet.java}
    public OffHeapBitSet(long numBits)
    {
        // OpenBitSet.bits2words calculation is there for backward compatibility.
        int byteCount = OpenBitSet.bits2words(numBits) * 8;
        bytes = RefCountedMemory.allocate(byteCount);
        // flush/clear the existing memory.
        clear();
    }

{code}

  was:
byteCount overflows and causes an IllegalArgument exception in Memory.allocate when bloomfilter
is > 2GB.

Suggest changing byteCount to long.

{code}
    public OffHeapBitSet(long numBits)
    {
        // OpenBitSet.bits2words calculation is there for backward compatibility.
        int byteCount = OpenBitSet.bits2words(numBits) * 8;
        bytes = RefCountedMemory.allocate(byteCount);
        // flush/clear the existing memory.
        clear();
    }

{code}

    
> Integer overflow in OffHeapBitSet when bloomfilter > 2GB
> --------------------------------------------------------
>
>                 Key: CASSANDRA-5903
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5903
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Taylan Develioglu
>             Fix For: 1.2.9
>
>
> In org.apache.cassandra.utils.obs.OffHeapBitSet.
> byteCount overflows and causes an IllegalArgument exception in Memory.allocate when bloomfilter
is > 2GB.
> Suggest changing byteCount to long.
> {code:title=OffHeapBitSet.java}
>     public OffHeapBitSet(long numBits)
>     {
>         // OpenBitSet.bits2words calculation is there for backward compatibility.
>         int byteCount = OpenBitSet.bits2words(numBits) * 8;
>         bytes = RefCountedMemory.allocate(byteCount);
>         // flush/clear the existing memory.
>         clear();
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message