bitset: fix index size calculation
Bitset index size calculation uses the cardinality of the 'flag' bitset, but when the bitset index is empty, i.e., uninitialized, the 'flag' bitset is not allocated, hence we should simply return 0. Closes #5809 NO_DOC=bugfix
Showing
- changelogs/unreleased/gh-5809-bitset-index-len-crash.md 3 additions, 0 deletionschangelogs/unreleased/gh-5809-bitset-index-len-crash.md
- src/lib/bitset/index.h 2 additions, 1 deletionsrc/lib/bitset/index.h
- test/box-luatest/gh_5809_bitset_index_len_crash_test.lua 25 additions, 0 deletionstest/box-luatest/gh_5809_bitset_index_len_crash_test.lua
- test/unit/bitset_index.c 7 additions, 0 deletionstest/unit/bitset_index.c