crosvm/x86_64/Cargo.toml
David Tolnay 4b292afafc clippy: Resolve cast_ptr_alignment
This CL fixes four cases of what I believe are undefined behavior:

  - In vhost where the original code allocates a Vec<u8> with 1-byte
    alignment and casts the Vec's data pointer to a &mut vhost_memory
    which is required to be 8-byte aligned. Underaligned references of
    type &T or &mut T are always undefined behavior in Rust.

  - Same pattern in x86_64.

  - Same pattern in plugin::vcpu.

  - Code in crosvm_plugin that dereferences a potentially underaligned
    pointer. This is always undefined behavior in Rust.

TEST=bin/clippy
TEST=cargo test sys_util

Change-Id: I926f17b1fe022a798f69d738f9990d548f40c59b
Reviewed-on: https://chromium-review.googlesource.com/1566736
Commit-Ready: David Tolnay <dtolnay@chromium.org>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: David Tolnay <dtolnay@chromium.org>
2019-04-18 19:51:29 -07:00

27 lines
643 B
TOML

[package]
name = "x86_64"
version = "0.1.0"
authors = ["The Chromium OS Authors"]
edition = "2018"
build = "build.rs"
[dependencies]
arch = { path = "../arch" }
assertions = { path = "../assertions" }
byteorder = "*"
data_model = { path = "../data_model" }
devices = { path = "../devices" }
io_jail = { path = "../io_jail" }
kernel_cmdline = { path = "../kernel_cmdline" }
kernel_loader = { path = "../kernel_loader" }
kvm = { path = "../kvm" }
kvm_sys = { path = "../kvm_sys" }
libc = "*"
remain = "*"
resources = { path = "../resources" }
sync = { path = "../sync" }
sys_util = { path = "../sys_util" }
[build-dependencies]
cc = "=1.0.25"