crosvm/fuzz/Cargo.toml
Daniel Verkamp 0d2f3d276d fuzz: ensure sys_util path dependency is used
When compiling a new-enough crosvm for fuzzing (after
https://crrev.com/c/1749950), the build would fail with an error about
importing two different version of sys_util:

expected struct `sys_util::shm::SharedMemory`, found a different struct
`sys_util::shm::SharedMemory`
expected reference `sys_util::shm::SharedMemory (struct
`sys_util::shm::SharedMemory`)
found reference sys_util::shm::SharedMemory (struct
`sys_util::shm::SharedMemory`)
perhaps two different versions of crate `sys_util` are being used?

Fix this by patching the version of sys_util used by audio_streams
so that it also uses the path dependency instead of the sys_util from
the dev-rust/sys_util ebuild in the fuzz-specific Cargo.toml.

BUG=chromium:1057532
TEST=`USE='asan fuzzer' emerge-nami crosvm`

Change-Id: I38252465a1111a9a8f643a59e36733016c5db99d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2086401
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
2020-03-06 05:26:00 +00:00

48 lines
924 B
TOML

[package]
name = "crosvm-fuzz"
version = "0.0.1"
authors = ["The Chromium OS Authors"]
edition = "2018"
[dependencies]
cros_fuzz = "*"
data_model = { path = "../data_model" }
devices = { path = "../devices" }
disk = { path = "../disk" }
kernel_loader = { path = "../kernel_loader" }
libc = "*"
rand = "0.6"
sys_util = { path = "../sys_util" }
usb_util = { path = "../usb_util" }
# Prevent this from interfering with workspaces
[workspace]
members = ["."]
[[bin]]
name = "crosvm_block_fuzzer"
path = "block_fuzzer.rs"
[[bin]]
name = "crosvm_fs_server_fuzzer"
path = "fs_server_fuzzer.rs"
[[bin]]
name = "crosvm_qcow_fuzzer"
path = "qcow_fuzzer.rs"
[[bin]]
name = "crosvm_usb_descriptor_fuzzer"
path = "usb_descriptor_fuzzer.rs"
[[bin]]
name = "crosvm_virtqueue_fuzzer"
path = "virtqueue_fuzzer.rs"
[[bin]]
name = "crosvm_zimage_fuzzer"
path = "zimage_fuzzer.rs"
[patch.crates-io]
sys_util = { path = "../sys_util" }