mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 12:34:31 +00:00
4b6c33d346
The loop that generates the CPU affinity mask uses a shift by the CPU index to generate a u64, so if the shift count is 64 or greater, it will shift past the end of the u64 and panic when overflow checks are enabled (which we enable by default in release builds in Cargo.toml). Add a bounds check so set_cpu_affinity() will return an error rather than causing a panic in this case. BUG=None TEST=run tests via wine on 72 logical core machine Change-Id: I2ac4a0602b2c014aeca4939ec2882926cdfe2c29 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3935523 Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Dennis Kempin <denniskempin@google.com> |
||
---|---|---|
.. | ||
base_event_token_derive | ||
src | ||
.build_test_serial | ||
Cargo.toml |