[INFO] cloning repository https://github.com/Xiaozxiaobai/os-lesson-lab [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Xiaozxiaobai/os-lesson-lab" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXiaozxiaobai%2Fos-lesson-lab", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXiaozxiaobai%2Fos-lesson-lab'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 76ee43108ecaa582815ea6bc4b712a5ff7570815 [INFO] checking Xiaozxiaobai/os-lesson-lab against try#70daa2c0d8eed7066b07966f3c0b0b8622bff4e4 for pr-151539 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXiaozxiaobai%2Fos-lesson-lab" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-6-tc2/source/.cargo/config.toml [INFO] removed /workspace/builds/worker-6-tc2/source/rust-toolchain.toml [INFO] started tweaking git repo https://github.com/Xiaozxiaobai/os-lesson-lab [INFO] finished tweaking git repo https://github.com/Xiaozxiaobai/os-lesson-lab [INFO] tweaked toml for git repo https://github.com/Xiaozxiaobai/os-lesson-lab written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Xiaozxiaobai/os-lesson-lab on toolchain 70daa2c0d8eed7066b07966f3c0b0b8622bff4e4 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+70daa2c0d8eed7066b07966f3c0b0b8622bff4e4" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/Xiaozxiaobai/os-lesson-lab already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+70daa2c0d8eed7066b07966f3c0b0b8622bff4e4" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [ERROR] error running command: no output for 300 seconds [INFO] checking Xiaozxiaobai/os-lesson-lab against try#70daa2c0d8eed7066b07966f3c0b0b8622bff4e4 for pr-151539 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXiaozxiaobai%2Fos-lesson-lab" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-6-tc2/source/.cargo/config.toml [INFO] removed /workspace/builds/worker-6-tc2/source/rust-toolchain.toml [INFO] started tweaking git repo https://github.com/Xiaozxiaobai/os-lesson-lab [INFO] finished tweaking git repo https://github.com/Xiaozxiaobai/os-lesson-lab [INFO] tweaked toml for git repo https://github.com/Xiaozxiaobai/os-lesson-lab written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Xiaozxiaobai/os-lesson-lab on toolchain 70daa2c0d8eed7066b07966f3c0b0b8622bff4e4 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+70daa2c0d8eed7066b07966f3c0b0b8622bff4e4" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/Xiaozxiaobai/os-lesson-lab already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+70daa2c0d8eed7066b07966f3c0b0b8622bff4e4" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded bit_field v0.10.0 [INFO] [stderr] Downloaded array-macro v2.0.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:61361fe0aef631f17e9d025a70c5a647956f8c671dd02950a60ad3f5cc5526d7" "/opt/rustwide/cargo-home/bin/cargo" "+70daa2c0d8eed7066b07966f3c0b0b8622bff4e4" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] aa09c01bb35531f05ff4b7e53d3c2112dee6f41395e5841f8bf0316212da8e0e [INFO] running `Command { std: "docker" "start" "-a" "aa09c01bb35531f05ff4b7e53d3c2112dee6f41395e5841f8bf0316212da8e0e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "aa09c01bb35531f05ff4b7e53d3c2112dee6f41395e5841f8bf0316212da8e0e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aa09c01bb35531f05ff4b7e53d3c2112dee6f41395e5841f8bf0316212da8e0e", kill_on_drop: false }` [INFO] [stdout] aa09c01bb35531f05ff4b7e53d3c2112dee6f41395e5841f8bf0316212da8e0e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:61361fe0aef631f17e9d025a70c5a647956f8c671dd02950a60ad3f5cc5526d7" "/opt/rustwide/cargo-home/bin/cargo" "+70daa2c0d8eed7066b07966f3c0b0b8622bff4e4" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 6a038f77e5b66b0c58777ec0b731a905d42aa4f894dde91ea93f96e52423d32d [INFO] running `Command { std: "docker" "start" "-a" "6a038f77e5b66b0c58777ec0b731a905d42aa4f894dde91ea93f96e52423d32d", kill_on_drop: false }` [INFO] [stderr] Checking bit_field v0.10.0 [INFO] [stderr] Checking array-macro v2.0.0 [INFO] [stderr] Checking bitflags v1.2.1 [INFO] [stderr] Checking xv6-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `kvm_pa` [INFO] [stdout] --> src/mm/mod.rs:8:49 [INFO] [stdout] | [INFO] [stdout] 8 | pub use kvm::{kvm_init, kvm_init_hart, kvm_map, kvm_pa}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `KERNEL_HEAP` and `KernelHeap` [INFO] [stdout] --> src/mm/mod.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | pub use kalloc::{KernelHeap, KERNEL_HEAP}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `alloc::string::String` [INFO] [stdout] --> src/process/proc/syscall.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use alloc::string::String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `extern` declarations without an explicit ABI are deprecated [INFO] [stdout] --> src/trap.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub unsafe extern fn user_trap() { [INFO] [stdout] | ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(missing_abi)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `kvm_pa` [INFO] [stdout] --> src/mm/mod.rs:8:49 [INFO] [stdout] | [INFO] [stdout] 8 | pub use kvm::{kvm_init, kvm_init_hart, kvm_map, kvm_pa}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `KERNEL_HEAP` and `KernelHeap` [INFO] [stdout] --> src/mm/mod.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | pub use kalloc::{KernelHeap, KERNEL_HEAP}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `alloc::string::String` [INFO] [stdout] --> src/process/proc/syscall.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use alloc::string::String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `extern` declarations without an explicit ABI are deprecated [INFO] [stdout] --> src/trap.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub unsafe extern fn user_trap() { [INFO] [stdout] | ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(missing_abi)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: the `#[alloc_error_handler]` in this crate conflicts with allocation error handler in: std [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the feature `new_zeroed_alloc` has been stable since 1.92.0 and no longer requires an attribute to enable [INFO] [stdout] --> src/lib.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | #![feature(new_zeroed_alloc)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(stable_features)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the feature `new_zeroed_alloc` has been stable since 1.92.0 and no longer requires an attribute to enable [INFO] [stdout] --> src/lib.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | #![feature(new_zeroed_alloc)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(stable_features)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `kvm_pa` [INFO] [stdout] --> src/mm/mod.rs:8:49 [INFO] [stdout] | [INFO] [stdout] 8 | pub use kvm::{kvm_init, kvm_init_hart, kvm_map, kvm_pa}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `KERNEL_HEAP` and `KernelHeap` [INFO] [stdout] --> src/mm/mod.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | pub use kalloc::{KernelHeap, KERNEL_HEAP}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `alloc::string::String` [INFO] [stdout] --> src/process/proc/syscall.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use alloc::string::String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `extern` declarations without an explicit ABI are deprecated [INFO] [stdout] --> src/trap.rs:25:12 [INFO] [stdout] | [INFO] [stdout] 25 | pub unsafe extern fn user_trap() { [INFO] [stdout] | ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(missing_abi)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0152]: found duplicate lang item `panic_impl` [INFO] [stdout] --> src/printf.rs:61:1 [INFO] [stdout] | [INFO] [stdout] 61 | / fn panic(info: &panic::PanicInfo<'_>) -> ! { [INFO] [stdout] 62 | | crate::println!("{}", info); [INFO] [stdout] 63 | | PANICKED.store(true, Ordering::Relaxed); [INFO] [stdout] 64 | | loop {} [INFO] [stdout] 65 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = note: the lang item is first defined in crate `std` (which `test` depends on) [INFO] [stdout] = note: first definition in `std` loaded from /opt/rustwide/rustup-home/toolchains/70daa2c0d8eed7066b07966f3c0b0b8622bff4e4/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-957b1fe07cf96b13.rmeta [INFO] [stdout] = note: second definition in the local crate (`xv6_rust`) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0152`. [INFO] [stdout] [INFO] [stderr] error: could not compile `xv6-rust` (lib test) due to 2 previous errors; 4 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/mm/pagetable.rs:562:29 [INFO] [stdout] | [INFO] [stdout] 562 | Err(s) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/mm/pagetable.rs:828:21 [INFO] [stdout] | [INFO] [stdout] 828 | Err(s) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/mm/pagetable.rs:884:21 [INFO] [stdout] | [INFO] [stdout] 884 | Err(s) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/mm/pagetable.rs:896:21 [INFO] [stdout] | [INFO] [stdout] 896 | Err(s) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/mm/pagetable.rs:562:29 [INFO] [stdout] | [INFO] [stdout] 562 | Err(s) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/mm/pagetable.rs:828:21 [INFO] [stdout] | [INFO] [stdout] 828 | Err(s) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/mm/pagetable.rs:884:21 [INFO] [stdout] | [INFO] [stdout] 884 | Err(s) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/mm/pagetable.rs:896:21 [INFO] [stdout] | [INFO] [stdout] 896 | Err(s) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/process/proc/syscall.rs:505:32 [INFO] [stdout] | [INFO] [stdout] 505 | fn syscall_warning(s: T) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/process/proc/syscall.rs:505:32 [INFO] [stdout] | [INFO] [stdout] 505 | fn syscall_warning(s: T) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/fs/mod.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | SUPER_BLOCK.init(dev); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:123:26 [INFO] [stdout] | [INFO] [stdout] 123 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:148:18 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { PROC_MANAGER.wakeup(&pipe.write_cnt as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:189:26 [INFO] [stdout] | [INFO] [stdout] 189 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:201:26 [INFO] [stdout] | [INFO] [stdout] 201 | unsafe { PROC_MANAGER.wakeup(&pipe.read_cnt as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:215:18 [INFO] [stdout] | [INFO] [stdout] 215 | unsafe { PROC_MANAGER.wakeup(&pipe.read_cnt as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:255:22 [INFO] [stdout] | [INFO] [stdout] 255 | unsafe { PROC_MANAGER.wakeup(&pipe.read_cnt as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:258:22 [INFO] [stdout] | [INFO] [stdout] 258 | unsafe { PROC_MANAGER.wakeup(&pipe.write_cnt as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/inode.rs:272:30 [INFO] [stdout] | [INFO] [stdout] 272 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/inode.rs:570:55 [INFO] [stdout] | [INFO] [stdout] 570 | let buf = BCACHE.bread(self.dev, unsafe { SUPER_BLOCK.locate_inode(self.inum) }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/inode.rs:780:50 [INFO] [stdout] | [INFO] [stdout] 780 | let mut buf = BCACHE.bread(dev, unsafe { SUPER_BLOCK.locate_inode(inum) }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/log.rs:94:29 [INFO] [stdout] | [INFO] [stdout] 94 | let (start, size) = SUPER_BLOCK.read_log(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/log.rs:395:26 [INFO] [stdout] | [INFO] [stdout] 395 | unsafe { CPU_MANAGER.my_proc().sleep(channel, guard); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/log.rs:520:22 [INFO] [stdout] | [INFO] [stdout] 520 | unsafe { PROC_MANAGER.wakeup(channel); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/log.rs:531:22 [INFO] [stdout] | [INFO] [stdout] 531 | unsafe { PROC_MANAGER.wakeup(channel); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/block.rs:49:32 [INFO] [stdout] | [INFO] [stdout] 49 | let total_block = unsafe { SUPER_BLOCK.size() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/block.rs:51:50 [INFO] [stdout] | [INFO] [stdout] 51 | let mut buf = BCACHE.bread(dev, unsafe { SUPER_BLOCK.bitmap_blockno(base) }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/block.rs:109:31 [INFO] [stdout] | [INFO] [stdout] 109 | let bm_blockno = unsafe { SUPER_BLOCK.bitmap_blockno(blockno) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/block.rs:156:25 [INFO] [stdout] | [INFO] [stdout] 156 | let size = unsafe { SUPER_BLOCK.inode_size() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/block.rs:158:32 [INFO] [stdout] | [INFO] [stdout] 158 | let blockno = unsafe { SUPER_BLOCK.locate_inode(inum) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/mm/mod.rs:101:34 [INFO] [stdout] | [INFO] [stdout] 101 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/mm/mod.rs:119:34 [INFO] [stdout] | [INFO] [stdout] 119 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/mm/kalloc.rs:85:23 [INFO] [stdout] | [INFO] [stdout] 85 | let end = end as usize; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(function_casts_as_integer)]` on by default [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 85 | let end = end as *const () as usize; [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/mm/kvm.rs:32:17 [INFO] [stdout] | [INFO] [stdout] 32 | satp::write(KERNEL_PAGE_TABLE.as_satp()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/mm/kvm.rs:106:23 [INFO] [stdout] | [INFO] [stdout] 106 | let etext = etext as usize; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 106 | let etext = etext as *const () as usize; [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/mm/kvm.rs:131:39 [INFO] [stdout] | [INFO] [stdout] 131 | PhysAddr::try_from(trampoline as usize).unwrap(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 131 | PhysAddr::try_from(trampoline as *const () as usize).unwrap(), [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/mm/kvm.rs:149:23 [INFO] [stdout] | [INFO] [stdout] 149 | if let Err(err) = KERNEL_PAGE_TABLE.map_pages(va, size, pa, perm) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/mm/kvm.rs:175:11 [INFO] [stdout] | [INFO] [stdout] 175 | match KERNEL_PAGE_TABLE.walk(va) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/mm/pagetable.rs:435:47 [INFO] [stdout] | [INFO] [stdout] 435 | PhysAddr::try_from(trampoline as usize).unwrap(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 435 | PhysAddr::try_from(trampoline as *const () as usize).unwrap(), [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/mod.rs:459:13 [INFO] [stdout] | [INFO] [stdout] 459 | CPU_MANAGER.my_cpu_mut().sched(exit_pexcl, exit_ctx); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/mod.rs:501:26 [INFO] [stdout] | [INFO] [stdout] 501 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/mod.rs:595:5 [INFO] [stdout] | [INFO] [stdout] 595 | CPU_MANAGER.my_proc().excl.unlock(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/process/proc/mod.rs:191:36 [INFO] [stdout] | [INFO] [stdout] 191 | tf.kernel_trap = user_trap as usize; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 191 | tf.kernel_trap = user_trap as *const () as usize; [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/proc/mod.rs:456:22 [INFO] [stdout] | [INFO] [stdout] 456 | unsafe { PROC_MANAGER.exiting(self.index, exit_status); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/proc/mod.rs:465:18 [INFO] [stdout] | [INFO] [stdout] 465 | unsafe { PROC_MANAGER.exiting(self.index, exit_status); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/proc/mod.rs:565:26 [INFO] [stdout] | [INFO] [stdout] 565 | guard = unsafe { CPU_MANAGER.my_cpu_mut().sched(guard, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/proc/mod.rs:616:21 [INFO] [stdout] | [INFO] [stdout] 616 | let c = CPU_MANAGER.my_cpu_mut(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/proc/mod.rs:665:30 [INFO] [stdout] | [INFO] [stdout] 665 | let child = unsafe { PROC_MANAGER.alloc_proc().ok_or(())? }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/proc/mod.rs:698:18 [INFO] [stdout] | [INFO] [stdout] 698 | unsafe { PROC_MANAGER.set_parent(child.index, self.index); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/proc/syscall.rs:65:18 [INFO] [stdout] | [INFO] [stdout] 65 | unsafe { PROC_MANAGER.exiting(self.index, exit_status); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/proc/syscall.rs:73:29 [INFO] [stdout] | [INFO] [stdout] 73 | let ret = unsafe { PROC_MANAGER.waiting(self.index, addr) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/proc/syscall.rs:137:28 [INFO] [stdout] | [INFO] [stdout] 137 | let ret = unsafe { PROC_MANAGER.kill(pid) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/cpu.rs:152:19 [INFO] [stdout] | [INFO] [stdout] 152 | match PROC_MANAGER.alloc_runnable() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/cpu.rs:346:22 [INFO] [stdout] | [INFO] [stdout] 346 | let c = unsafe { CPU_MANAGER.my_cpu_mut() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/cpu.rs:390:22 [INFO] [stdout] | [INFO] [stdout] 390 | let c = unsafe { CPU_MANAGER.my_cpu_mut() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/rmain.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | PROC_MANAGER.proc_init(); // process table [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/fs/mod.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | SUPER_BLOCK.init(dev); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/rmain.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | PROC_MANAGER.user_init(); // first user process [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/rmain.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | CPU_MANAGER.scheduler(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:123:26 [INFO] [stdout] | [INFO] [stdout] 123 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:148:18 [INFO] [stdout] | [INFO] [stdout] 148 | unsafe { PROC_MANAGER.wakeup(&pipe.write_cnt as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:189:26 [INFO] [stdout] | [INFO] [stdout] 189 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/sleeplock.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | CPU_MANAGER.my_proc().sleep(self.locked.as_ptr() as usize, guard); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:201:26 [INFO] [stdout] | [INFO] [stdout] 201 | unsafe { PROC_MANAGER.wakeup(&pipe.read_cnt as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:215:18 [INFO] [stdout] | [INFO] [stdout] 215 | unsafe { PROC_MANAGER.wakeup(&pipe.read_cnt as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/sleeplock.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | PROC_MANAGER.wakeup(self.locked.as_ptr() as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/start.rs:18:27 [INFO] [stdout] | [INFO] [stdout] 18 | mepc::write(rust_main as usize); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 18 | mepc::write(rust_main as *const () as usize); [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/start.rs:68:22 [INFO] [stdout] | [INFO] [stdout] 68 | mscratch::write((MSCRATCH0.as_ptr() as usize) + offset * core::mem::size_of::()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/start.rs:74:27 [INFO] [stdout] | [INFO] [stdout] 74 | mtvec::write(timervec as usize); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 74 | mtvec::write(timervec as *const () as usize); [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/trap.rs:20:28 [INFO] [stdout] | [INFO] [stdout] 20 | stvec::write(kernelvec as usize); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 20 | stvec::write(kernelvec as *const () as usize); [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/trap.rs:32:28 [INFO] [stdout] | [INFO] [stdout] 32 | stvec::write(kernelvec as usize); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 32 | stvec::write(kernelvec as *const () as usize); [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/trap.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | let p = CPU_MANAGER.my_proc(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/trap.rs:96:18 [INFO] [stdout] | [INFO] [stdout] 96 | let pd = CPU_MANAGER.my_proc().data.get_mut(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/trap.rs:105:28 [INFO] [stdout] | [INFO] [stdout] 105 | let distance = userret as usize - trampoline as usize; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 105 | let distance = userret as *const () as usize - trampoline as usize; [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/trap.rs:105:50 [INFO] [stdout] | [INFO] [stdout] 105 | let distance = userret as usize - trampoline as usize; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 105 | let distance = userret as usize - trampoline as *const () as usize; [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/trap.rs:154:13 [INFO] [stdout] | [INFO] [stdout] 154 | CPU_MANAGER.my_cpu_mut().try_yield_proc(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:255:22 [INFO] [stdout] | [INFO] [stdout] 255 | unsafe { PROC_MANAGER.wakeup(&pipe.read_cnt as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/file/pipe.rs:258:22 [INFO] [stdout] | [INFO] [stdout] 258 | unsafe { PROC_MANAGER.wakeup(&pipe.write_cnt as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/inode.rs:272:30 [INFO] [stdout] | [INFO] [stdout] 272 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/trap.rs:177:14 [INFO] [stdout] | [INFO] [stdout] 177 | unsafe { PROC_MANAGER.wakeup(&TICKS as *const _ as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/inode.rs:570:55 [INFO] [stdout] | [INFO] [stdout] 570 | let buf = BCACHE.bread(self.dev, unsafe { SUPER_BLOCK.locate_inode(self.inum) }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/inode.rs:780:50 [INFO] [stdout] | [INFO] [stdout] 780 | let mut buf = BCACHE.bread(dev, unsafe { SUPER_BLOCK.locate_inode(inum) }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/log.rs:94:29 [INFO] [stdout] | [INFO] [stdout] 94 | let (start, size) = SUPER_BLOCK.read_log(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/log.rs:395:26 [INFO] [stdout] | [INFO] [stdout] 395 | unsafe { CPU_MANAGER.my_proc().sleep(channel, guard); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/log.rs:520:22 [INFO] [stdout] | [INFO] [stdout] 520 | unsafe { PROC_MANAGER.wakeup(channel); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/log.rs:531:22 [INFO] [stdout] | [INFO] [stdout] 531 | unsafe { PROC_MANAGER.wakeup(channel); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/virtio_disk.rs:160:13 [INFO] [stdout] | [INFO] [stdout] 160 | PROC_MANAGER.wakeup(&self.free[0] as *const bool as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/virtio_disk.rs:201:22 [INFO] [stdout] | [INFO] [stdout] 201 | unsafe { PROC_MANAGER.wakeup(buf_raw_data); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/virtio_disk.rs:220:21 [INFO] [stdout] | [INFO] [stdout] 220 | CPU_MANAGER.my_proc().sleep(&guard.free[0] as *const bool as usize, guard); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/block.rs:49:32 [INFO] [stdout] | [INFO] [stdout] 49 | let total_block = unsafe { SUPER_BLOCK.size() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/block.rs:51:50 [INFO] [stdout] | [INFO] [stdout] 51 | let mut buf = BCACHE.bread(dev, unsafe { SUPER_BLOCK.bitmap_blockno(base) }); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/virtio_disk.rs:271:22 [INFO] [stdout] | [INFO] [stdout] 271 | unsafe { CPU_MANAGER.my_proc().sleep(buf_raw_data as usize, guard); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/block.rs:109:31 [INFO] [stdout] | [INFO] [stdout] 109 | let bm_blockno = unsafe { SUPER_BLOCK.bitmap_blockno(blockno) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/block.rs:156:25 [INFO] [stdout] | [INFO] [stdout] 156 | let size = unsafe { SUPER_BLOCK.inode_size() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/console.rs:28:30 [INFO] [stdout] | [INFO] [stdout] 28 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/console.rs:129:30 [INFO] [stdout] | [INFO] [stdout] 129 | unsafe { PROC_MANAGER.wakeup(&console.ri as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/uart.rs:88:34 [INFO] [stdout] | [INFO] [stdout] 88 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/fs/block.rs:158:32 [INFO] [stdout] | [INFO] [stdout] 158 | let blockno = unsafe { SUPER_BLOCK.locate_inode(inum) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/uart.rs:133:22 [INFO] [stdout] | [INFO] [stdout] 133 | unsafe { PROC_MANAGER.wakeup(&self.ri as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/mm/mod.rs:101:34 [INFO] [stdout] | [INFO] [stdout] 101 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/mm/mod.rs:119:34 [INFO] [stdout] | [INFO] [stdout] 119 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/mm/kalloc.rs:85:23 [INFO] [stdout] | [INFO] [stdout] 85 | let end = end as usize; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(function_casts_as_integer)]` on by default [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 85 | let end = end as *const () as usize; [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/mm/kvm.rs:32:17 [INFO] [stdout] | [INFO] [stdout] 32 | satp::write(KERNEL_PAGE_TABLE.as_satp()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/mm/kvm.rs:106:23 [INFO] [stdout] | [INFO] [stdout] 106 | let etext = etext as usize; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 106 | let etext = etext as *const () as usize; [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/mm/kvm.rs:131:39 [INFO] [stdout] | [INFO] [stdout] 131 | PhysAddr::try_from(trampoline as usize).unwrap(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 131 | PhysAddr::try_from(trampoline as *const () as usize).unwrap(), [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/mm/kvm.rs:149:23 [INFO] [stdout] | [INFO] [stdout] 149 | if let Err(err) = KERNEL_PAGE_TABLE.map_pages(va, size, pa, perm) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/mm/kvm.rs:175:11 [INFO] [stdout] | [INFO] [stdout] 175 | match KERNEL_PAGE_TABLE.walk(va) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/mm/pagetable.rs:435:47 [INFO] [stdout] | [INFO] [stdout] 435 | PhysAddr::try_from(trampoline as usize).unwrap(), [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 435 | PhysAddr::try_from(trampoline as *const () as usize).unwrap(), [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/mod.rs:459:13 [INFO] [stdout] | [INFO] [stdout] 459 | CPU_MANAGER.my_cpu_mut().sched(exit_pexcl, exit_ctx); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/mod.rs:501:26 [INFO] [stdout] | [INFO] [stdout] 501 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/mod.rs:595:5 [INFO] [stdout] | [INFO] [stdout] 595 | CPU_MANAGER.my_proc().excl.unlock(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/process/proc/mod.rs:191:36 [INFO] [stdout] | [INFO] [stdout] 191 | tf.kernel_trap = user_trap as usize; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 191 | tf.kernel_trap = user_trap as *const () as usize; [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/proc/mod.rs:456:22 [INFO] [stdout] | [INFO] [stdout] 456 | unsafe { PROC_MANAGER.exiting(self.index, exit_status); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/proc/mod.rs:465:18 [INFO] [stdout] | [INFO] [stdout] 465 | unsafe { PROC_MANAGER.exiting(self.index, exit_status); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/proc/mod.rs:565:26 [INFO] [stdout] | [INFO] [stdout] 565 | guard = unsafe { CPU_MANAGER.my_cpu_mut().sched(guard, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/proc/mod.rs:616:21 [INFO] [stdout] | [INFO] [stdout] 616 | let c = CPU_MANAGER.my_cpu_mut(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/proc/mod.rs:665:30 [INFO] [stdout] | [INFO] [stdout] 665 | let child = unsafe { PROC_MANAGER.alloc_proc().ok_or(())? }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/proc/mod.rs:698:18 [INFO] [stdout] | [INFO] [stdout] 698 | unsafe { PROC_MANAGER.set_parent(child.index, self.index); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/proc/syscall.rs:65:18 [INFO] [stdout] | [INFO] [stdout] 65 | unsafe { PROC_MANAGER.exiting(self.index, exit_status); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/proc/syscall.rs:73:29 [INFO] [stdout] | [INFO] [stdout] 73 | let ret = unsafe { PROC_MANAGER.waiting(self.index, addr) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/process/proc/syscall.rs:137:28 [INFO] [stdout] | [INFO] [stdout] 137 | let ret = unsafe { PROC_MANAGER.kill(pid) }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/cpu.rs:152:19 [INFO] [stdout] | [INFO] [stdout] 152 | match PROC_MANAGER.alloc_runnable() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/cpu.rs:346:22 [INFO] [stdout] | [INFO] [stdout] 346 | let c = unsafe { CPU_MANAGER.my_cpu_mut() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/process/cpu.rs:390:22 [INFO] [stdout] | [INFO] [stdout] 390 | let c = unsafe { CPU_MANAGER.my_cpu_mut() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/rmain.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | PROC_MANAGER.proc_init(); // process table [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/rmain.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | PROC_MANAGER.user_init(); // first user process [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/rmain.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | CPU_MANAGER.scheduler(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/sleeplock.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | CPU_MANAGER.my_proc().sleep(self.locked.as_ptr() as usize, guard); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/sleeplock.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | PROC_MANAGER.wakeup(self.locked.as_ptr() as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/start.rs:18:27 [INFO] [stdout] | [INFO] [stdout] 18 | mepc::write(rust_main as usize); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 18 | mepc::write(rust_main as *const () as usize); [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/start.rs:68:22 [INFO] [stdout] | [INFO] [stdout] 68 | mscratch::write((MSCRATCH0.as_ptr() as usize) + offset * core::mem::size_of::()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/start.rs:74:27 [INFO] [stdout] | [INFO] [stdout] 74 | mtvec::write(timervec as usize); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 74 | mtvec::write(timervec as *const () as usize); [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/trap.rs:20:28 [INFO] [stdout] | [INFO] [stdout] 20 | stvec::write(kernelvec as usize); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 20 | stvec::write(kernelvec as *const () as usize); [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/trap.rs:32:28 [INFO] [stdout] | [INFO] [stdout] 32 | stvec::write(kernelvec as usize); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 32 | stvec::write(kernelvec as *const () as usize); [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/trap.rs:34:13 [INFO] [stdout] | [INFO] [stdout] 34 | let p = CPU_MANAGER.my_proc(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/trap.rs:96:18 [INFO] [stdout] | [INFO] [stdout] 96 | let pd = CPU_MANAGER.my_proc().data.get_mut(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/trap.rs:105:28 [INFO] [stdout] | [INFO] [stdout] 105 | let distance = userret as usize - trampoline as usize; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 105 | let distance = userret as *const () as usize - trampoline as usize; [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: direct cast of function item into an integer [INFO] [stdout] --> src/trap.rs:105:50 [INFO] [stdout] | [INFO] [stdout] 105 | let distance = userret as usize - trampoline as usize; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: first cast to a pointer `as *const ()` [INFO] [stdout] | [INFO] [stdout] 105 | let distance = userret as usize - trampoline as *const () as usize; [INFO] [stdout] | ++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/trap.rs:154:13 [INFO] [stdout] | [INFO] [stdout] 154 | CPU_MANAGER.my_cpu_mut().try_yield_proc(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/trap.rs:177:14 [INFO] [stdout] | [INFO] [stdout] 177 | unsafe { PROC_MANAGER.wakeup(&TICKS as *const _ as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/virtio_disk.rs:160:13 [INFO] [stdout] | [INFO] [stdout] 160 | PROC_MANAGER.wakeup(&self.free[0] as *const bool as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/virtio_disk.rs:201:22 [INFO] [stdout] | [INFO] [stdout] 201 | unsafe { PROC_MANAGER.wakeup(buf_raw_data); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/virtio_disk.rs:220:21 [INFO] [stdout] | [INFO] [stdout] 220 | CPU_MANAGER.my_proc().sleep(&guard.free[0] as *const bool as usize, guard); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/virtio_disk.rs:271:22 [INFO] [stdout] | [INFO] [stdout] 271 | unsafe { CPU_MANAGER.my_proc().sleep(buf_raw_data as usize, guard); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/console.rs:28:30 [INFO] [stdout] | [INFO] [stdout] 28 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/console.rs:129:30 [INFO] [stdout] | [INFO] [stdout] 129 | unsafe { PROC_MANAGER.wakeup(&console.ri as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/uart.rs:88:34 [INFO] [stdout] | [INFO] [stdout] 88 | let p = unsafe { CPU_MANAGER.my_proc() }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/driver/uart.rs:133:22 [INFO] [stdout] | [INFO] [stdout] 133 | unsafe { PROC_MANAGER.wakeup(&self.ri as *const Wrapping<_> as usize); } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "6a038f77e5b66b0c58777ec0b731a905d42aa4f894dde91ea93f96e52423d32d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6a038f77e5b66b0c58777ec0b731a905d42aa4f894dde91ea93f96e52423d32d", kill_on_drop: false }` [INFO] [stdout] 6a038f77e5b66b0c58777ec0b731a905d42aa4f894dde91ea93f96e52423d32d