Closed farruggia closed 8 years ago
I guess that removing the line
if(m_capacity == 0) { return; }
from the constructor of sd_vector_builder
should help. It looks like the general case will work with no 1-bits after all.
I just patched sd_vector.cpp as you propose and it seems that the bug is now gone (tested access + iteration + rank queries).
A crash occurs whenever a bit is accessed using
operator[]
on asd_array
with 0 bits set to 1.Example code:
which results in the following assertion error when building in debug mode:
the problem does not occur when even just one bit, in any position, is set to 1.