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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2, 6.0
    • Component/s: core/other
    • Labels:
      None
    • Lucene Fields:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: