crosvm/fuzz/Cargo.toml
Pierre-Clément Tosi a6d39c5fa9 rand: Bump dependency to 0.9.2
Use rand::random() or rand::Rng::fill() in place of the now-removed
OsRng.fill_bytes(), note that the generic function now supports arrays
of any length.

Replace the deprecated rand::thread_rng() with its new name rand::rng()
or with new alternatives such as rand::random_range() where appropriate.

In fuzz/, update the impl of rand_core::RndCore which now does not
require implementing try_fill_bytes() (moved to TryRndCore) so remove it
as the function was only used by unit tests (which can also be removed).

As a result, CrosVM now follow the clean split of all client code only
depending on rand::Rnd (no imports of RndCore left) and the one provided
(FuzzRng) uses the rand_core crate, as recommended by the crate docs.

BUG=b:460349550
TEST=tools/presubmit

Change-Id: Icf0121297efcb0388e8aab17394c21457edbb119
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/7253053
Auto-Submit: Pierre-Clément Tosi <ptosi@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Pierre-Clément Tosi <ptosi@google.com>
2026-01-30 03:12:59 -08:00

76 lines
1.4 KiB
TOML

[package]
name = "crosvm-fuzz"
version = "0.0.1"
publish = false
edition = "2021"
[package.metadata]
cargo-fuzz = true
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
[dependencies]
devices = { workspace = true }
disk = { workspace = true }
fuse = { workspace = true }
hypervisor = { workspace = true }
kernel_loader = { workspace = true }
libc = { workspace = true }
rand = { workspace = true }
base = { workspace = true }
tempfile = "3"
usb_util = { workspace = true }
vm_memory = { workspace = true }
p9 = "0.3.1"
rand_core = {version = "0.9.2", features = ["std"]}
cfg-if = { workspace = true }
[target.'cfg(fuzzing)'.dependencies]
libfuzzer-sys = "=0.4.4"
[features]
default = ["disk/qcow"]
[[bin]]
name = "block_fuzzer"
path = "fuzz_targets/block_fuzzer.rs"
test = false
doc = false
[[bin]]
name = "fs_server_fuzzer"
path = "fuzz_targets/fs_server_fuzzer.rs"
test = false
doc = false
[[bin]]
name = "p9_tframe_fuzzer"
path = "fuzz_targets/p9_tframe_fuzzer.rs"
test = false
doc = false
[[bin]]
name = "qcow_fuzzer"
path = "fuzz_targets/qcow_fuzzer.rs"
test = false
doc = false
[[bin]]
name = "usb_descriptor_fuzzer"
path = "fuzz_targets/usb_descriptor_fuzzer.rs"
test = false
doc = false
[[bin]]
name = "virtqueue_fuzzer"
path = "fuzz_targets/virtqueue_fuzzer.rs"
test = false
doc = false
[[bin]]
name = "zimage_fuzzer"
path = "fuzz_targets/zimage_fuzzer.rs"
test = false
doc = false