Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-5903

Integer overflow in OffHeapBitSet when bloomfilter > 2GB

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 1.2.9
    • None
    • Normal

    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.

      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();
          }
      
      

      Attachments

        1. 0001-CASSANDRA-5903.patch
          2 kB
          Vijay
        2. 0002-CASSANDRA-5903.patch
          0.8 kB
          Taylan Develioglu
        3. 0001-CASSANDRA-5903-check.patch
          3 kB
          Vijay

        Activity

          People

            vijay2win@yahoo.com Vijay
            tdevelioglu Taylan Develioglu
            Vijay
            Taylan Develioglu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: