You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
datastore: EliasFanoList32 spans invalid after move #2882
EliasFanoList32 potentially owns the data inside a data_holder_ property (as Bytes inside BytesOrByteView).
EliasFanoList32 contains spans that point somewhere inside that data: lower_bits_, upper_bits_, jump_.
These spans are initialized in derive_fields() method.
If EliasFanoList32 is moved, the spans potentially become dangling pointers, and accessing the list values might crash.
Potential solutions:
Implement move constructor/assignment and call derive_fields() there to reassign spans. This has performance impact.
Instead of using std::span, store an (offset, size) pair relative to the data_holder_ for each span (lower_bits_, upper_bits_, jump_). The spans can be created on demand using (offset, size). See data() method.
Activity