Fix: Bitsets are now correctly-sized (were x8 larger than expected)
Fix: Unexpected panic when calling Entities::create() with a maxed-out bitset
Fix: Reduce Miri CI job runtime to <30 minutes
Fix: Warnings emitted by Miri
Fix: Update the workspace rust-version to match the rust-toolchain.toml file at 1.81
Add: More bitset iterator tests (there will be a follow-up PR on this to organize them and simplify some that involve Entities unnecessarily)
Fix: Simplify test data, remove prints & dbg!s
Explanation
Fix: Bitsets are now correctly-sized (were x8 larger than expected)
Bitsets are 2^K bits, and the number of u32 arrays within them (which the docs now call "sectors") was previously calculated as 2^K / (32 * 8 / 8). The arrays are 32 * 8 bits meaning the array count should be calculated as 2^K / (32 * 8).
Added more docs to the bitset module.
Fix: Unexpected panic when calling Entities::create() with a maxed-out bitset
Unexpected panic on bit_set when all bits are set in alive except for some in the last sector, but those all belong to killed entities.
It attempts to bit_test at index BITSET_BITSIZE which is an overflow. This was not noticed before due to the bitset actually being larger than the size const.
Fix: Reduce Miri CI job runtime to <30 minutes
A full run pre-fix would likely take 12+ hours since it usually stops during seed 5/11, but it times-out at 6hrs.
Add a new feature set miri which is the same as default but with keysize10 (where bitsets are 128 bytes).
Unfortunately this complicates the script that runs miri because the new feature is not usable when running the whole workspace (cargo +nightly miri test --no-default-features -F miri does not work).
The bash script now runs each crate separately with -p, and adds --no-default-features -F miri only for bones_ecs.
Moved bash script into its own file since it's now more complex.
Closes #466
Changes
Entities::create()
with a maxed-out bitsetrust-version
to match therust-toolchain.toml
file at 1.81Entities
unnecessarily)dbg!
sExplanation
Fix: Bitsets are now correctly-sized (were x8 larger than expected)
2^K
bits, and the number ofu32
arrays within them (which the docs now call "sectors") was previously calculated as2^K / (32 * 8 / 8)
. The arrays are32 * 8
bits meaning the array count should be calculated as2^K / (32 * 8)
.bitset
module.Fix: Unexpected panic when calling
Entities::create()
with a maxed-out bitsetbit_set
when all bits are set inalive
except for some in the last sector, but those all belong to killed entities.bit_test
at indexBITSET_BITSIZE
which is an overflow. This was not noticed before due to the bitset actually being larger than the size const.Fix: Reduce Miri CI job runtime to <30 minutes
miri
which is the same asdefault
but withkeysize10
(where bitsets are 128 bytes).cargo +nightly miri test --no-default-features -F miri
does not work).-p
, and adds--no-default-features -F miri
only forbones_ecs
.