Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-6427

BitSet fixes - assert on presence of 'ghost bits' and others

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.2, 6.0
    • core/other
    • None
    • New

    Description

      Fixes after reviewing org.apache.lucene.util.FixedBitSet, LongBitSet and corresponding tests:

      • Some methods rely on the fact that no bits are set after numBits (what I call 'ghost' bits here).
        • cardinality, nextSetBit, intersects and others may yield wrong results
        • If ghost bits are present, they may become visible after ensureCapacity is called.
        • The tests deliberately create bitsets with ghost bits, but then do not detect these failures
      • FixedBitSet.cardinality scans the complete backing array, even if only numWords are in use

      Attachments

        Activity

          People

            Unassigned Unassigned
            lvl Luc Vanlerberghe
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: