[INFO] cloning repository https://github.com/romain-mg/rust-memory-allocator [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/romain-mg/rust-memory-allocator" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fromain-mg%2Frust-memory-allocator", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fromain-mg%2Frust-memory-allocator'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3d2b96b34d6225e8cf7afaafbdd6307431b770f4 [INFO] checking romain-mg/rust-memory-allocator against try#b047d5f4496a7526d91d0dddea494c05853f2a7b for pr-122661-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fromain-mg%2Frust-memory-allocator" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/romain-mg/rust-memory-allocator [INFO] finished tweaking git repo https://github.com/romain-mg/rust-memory-allocator [INFO] tweaked toml for git repo https://github.com/romain-mg/rust-memory-allocator written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/romain-mg/rust-memory-allocator on toolchain b047d5f4496a7526d91d0dddea494c05853f2a7b [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b047d5f4496a7526d91d0dddea494c05853f2a7b" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/romain-mg/rust-memory-allocator 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" "+b047d5f4496a7526d91d0dddea494c05853f2a7b" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [ERROR] error running command: no output for 300 seconds [INFO] checking romain-mg/rust-memory-allocator against try#b047d5f4496a7526d91d0dddea494c05853f2a7b for pr-122661-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fromain-mg%2Frust-memory-allocator" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/romain-mg/rust-memory-allocator [INFO] finished tweaking git repo https://github.com/romain-mg/rust-memory-allocator [INFO] tweaked toml for git repo https://github.com/romain-mg/rust-memory-allocator written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/romain-mg/rust-memory-allocator on toolchain b047d5f4496a7526d91d0dddea494c05853f2a7b [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b047d5f4496a7526d91d0dddea494c05853f2a7b" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/romain-mg/rust-memory-allocator 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" "+b047d5f4496a7526d91d0dddea494c05853f2a7b" "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 serial_test v3.2.0 [INFO] [stderr] Downloaded sdd v3.0.8 [INFO] [stderr] Downloaded serial_test_derive v3.2.0 [INFO] [stderr] Downloaded scc v2.3.4 [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:cf8efcab8866f2cf4285301c7418e2f4f2a9b088c91ba69c40d5b659f81557f7" "/opt/rustwide/cargo-home/bin/cargo" "+b047d5f4496a7526d91d0dddea494c05853f2a7b" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d25da6b43c914e7f4746fefccf40e5d11c15a5460cf4ff8cf90efe8ccb88c794 [INFO] running `Command { std: "docker" "start" "-a" "d25da6b43c914e7f4746fefccf40e5d11c15a5460cf4ff8cf90efe8ccb88c794", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d25da6b43c914e7f4746fefccf40e5d11c15a5460cf4ff8cf90efe8ccb88c794", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d25da6b43c914e7f4746fefccf40e5d11c15a5460cf4ff8cf90efe8ccb88c794", kill_on_drop: false }` [INFO] [stdout] d25da6b43c914e7f4746fefccf40e5d11c15a5460cf4ff8cf90efe8ccb88c794 [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:cf8efcab8866f2cf4285301c7418e2f4f2a9b088c91ba69c40d5b659f81557f7" "/opt/rustwide/cargo-home/bin/cargo" "+b047d5f4496a7526d91d0dddea494c05853f2a7b" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 11283ca8cbc425b7a585d81c039c081947ac768c4564f96f0f207e133167b89e [INFO] running `Command { std: "docker" "start" "-a" "11283ca8cbc425b7a585d81c039c081947ac768c4564f96f0f207e133167b89e", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.4.0 [INFO] [stderr] Compiling proc-macro2 v1.0.95 [INFO] [stderr] Checking futures-core v0.3.31 [INFO] [stderr] Compiling unicode-ident v1.0.18 [INFO] [stderr] Compiling libc v0.2.172 [INFO] [stderr] Checking futures-sink v0.3.31 [INFO] [stderr] Checking futures-io v0.3.31 [INFO] [stderr] Checking pin-utils v0.1.0 [INFO] [stderr] Checking pin-project-lite v0.2.16 [INFO] [stderr] Checking futures-task v0.3.31 [INFO] [stderr] Compiling parking_lot_core v0.9.10 [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Checking smallvec v1.15.0 [INFO] [stderr] Checking scopeguard v1.2.0 [INFO] [stderr] Checking sdd v3.0.8 [INFO] [stderr] Checking log v0.4.27 [INFO] [stderr] Checking once_cell v1.21.3 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Checking scc v2.3.4 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Compiling lock_api v0.4.12 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Compiling serial_test_derive v3.2.0 [INFO] [stderr] Checking serial_test v3.2.0 [INFO] [stderr] Checking mm_alloc v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `c_void`, `can_err_mask_t`, and `listen` [INFO] [stdout] --> src/mm_alloc.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | use libc::{c_void, can_err_mask_t, listen, sbrk}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::min` [INFO] [stdout] --> src/mm_alloc.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::cmp::min; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `null` and `self` [INFO] [stdout] --> src/mm_alloc.rs:5:11 [INFO] [stdout] | [INFO] [stdout] 5 | ptr::{self, copy, null, null_mut}, [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | if ROOT == null_mut() { [INFO] [stdout] | ^^^^ use of mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/mm_alloc.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | pub unsafe fn mm_malloc(size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(unsafe_op_in_unsafe_fn)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `c_void`, `can_err_mask_t`, and `listen` [INFO] [stdout] --> src/mm_alloc.rs:1:12 [INFO] [stdout] | [INFO] [stdout] 1 | use libc::{c_void, can_err_mask_t, listen, sbrk}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^^^^^^ ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::cmp::min` [INFO] [stdout] --> src/mm_alloc.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::cmp::min; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `null` and `self` [INFO] [stdout] --> src/mm_alloc.rs:5:11 [INFO] [stdout] | [INFO] [stdout] 5 | ptr::{self, copy, null, null_mut}, [INFO] [stdout] | ^^^^ ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | if ROOT == null_mut() { [INFO] [stdout] | ^^^^ use of mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/mm_alloc.rs:26:1 [INFO] [stdout] | [INFO] [stdout] 26 | pub unsafe fn mm_malloc(size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(unsafe_op_in_unsafe_fn)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `libc::sbrk` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:35:32 [INFO] [stdout] | [INFO] [stdout] 35 | let raw_root_pointer = sbrk(bits_to_allocate as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:40:22 [INFO] [stdout] | [INFO] [stdout] 40 | return_ptr = root_pointer.add(1) as *mut u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::write` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | / root_pointer.write(MemoryHeader { [INFO] [stdout] 42 | | prev: null_mut(), [INFO] [stdout] 43 | | next: null_mut(), [INFO] [stdout] 44 | | size: size, [INFO] [stdout] 45 | | free: false, [INFO] [stdout] 46 | | magic: return_ptr as isize ^ MAGIC, [INFO] [stdout] 47 | | }); [INFO] [stdout] | |__________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | ROOT = root_pointer; [INFO] [stdout] | ^^^^ use of mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:52:24 [INFO] [stdout] | [INFO] [stdout] 52 | let mut curr = ROOT; [INFO] [stdout] | ^^^^ use of mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:55:38 [INFO] [stdout] | [INFO] [stdout] 55 | while curr != null_mut() && ((*curr).size < aligned_size || !(*curr).free) { [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:55:70 [INFO] [stdout] | [INFO] [stdout] 55 | while curr != null_mut() && ((*curr).size < aligned_size || !(*curr).free) { [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:57:20 [INFO] [stdout] | [INFO] [stdout] 57 | curr = (*curr).next; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `libc::sbrk` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:61:33 [INFO] [stdout] | [INFO] [stdout] 61 | let block_pointer = sbrk(bits_to_allocate as isize) as *mut MemoryHeader; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:65:26 [INFO] [stdout] | [INFO] [stdout] 65 | return_ptr = block_pointer.add(1) as *mut u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::write` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | / block_pointer.write(MemoryHeader { [INFO] [stdout] 67 | | prev, [INFO] [stdout] 68 | | next: null_mut(), [INFO] [stdout] 69 | | size: aligned_size, [INFO] [stdout] 70 | | free: false, [INFO] [stdout] 71 | | magic: return_ptr as isize ^ MAGIC, [INFO] [stdout] 72 | | }); [INFO] [stdout] | |______________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | (*prev).next = block_pointer; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | (*curr).free = false; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:78:26 [INFO] [stdout] | [INFO] [stdout] 78 | return_ptr = curr.add(1) as *mut u8; [INFO] [stdout] | ^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:80:16 [INFO] [stdout] | [INFO] [stdout] 80 | if (*curr).size > aligned_size + SIZE_OF_MEMORY_HEADER + ONE_BYTE { [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:81:36 [INFO] [stdout] | [INFO] [stdout] 81 | let current_next = (*curr).next; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:84:42 [INFO] [stdout] | [INFO] [stdout] 84 | let new_next_as_u8_ptr = curr_as_u8_ptr [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 85 | | .add(SIZE_OF_MEMORY_HEADER_IN_BYTES) [INFO] [stdout] 86 | | .add(aligned_size / ONE_BYTE); [INFO] [stdout] | |_________________________________________________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:84:42 [INFO] [stdout] | [INFO] [stdout] 84 | let new_next_as_u8_ptr = curr_as_u8_ptr [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 85 | | .add(SIZE_OF_MEMORY_HEADER_IN_BYTES) [INFO] [stdout] | |________________________________________________________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::write` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:88:17 [INFO] [stdout] | [INFO] [stdout] 88 | / new_next.write(MemoryHeader { [INFO] [stdout] 89 | | prev: curr, [INFO] [stdout] 90 | | next: current_next, [INFO] [stdout] 91 | | size: (*curr).size - (aligned_size + SIZE_OF_MEMORY_HEADER), [INFO] [stdout] 92 | | free: true, [INFO] [stdout] 93 | | magic: new_next.add(1) as isize ^ MAGIC, [INFO] [stdout] 94 | | }); [INFO] [stdout] | |__________________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:91:27 [INFO] [stdout] | [INFO] [stdout] 91 | size: (*curr).size - (aligned_size + SIZE_OF_MEMORY_HEADER), [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:93:28 [INFO] [stdout] | [INFO] [stdout] 93 | magic: new_next.add(1) as isize ^ MAGIC, [INFO] [stdout] | ^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:95:17 [INFO] [stdout] | [INFO] [stdout] 95 | (*curr).next = new_next; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | (*curr).size -= SIZE_OF_MEMORY_HEADER + (*new_next).size [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:96:57 [INFO] [stdout] | [INFO] [stdout] 96 | (*curr).size -= SIZE_OF_MEMORY_HEADER + (*new_next).size [INFO] [stdout] | ^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:102:19 [INFO] [stdout] | [INFO] [stdout] 102 | let ptr = return_ptr.add(i); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | *ptr = 0; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `libc::sbrk` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:109:22 [INFO] [stdout] | [INFO] [stdout] 109 | let heap_break = sbrk(0) as *mut u8; [INFO] [stdout] | ^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/mm_alloc.rs:107:1 [INFO] [stdout] | [INFO] [stdout] 107 | pub unsafe fn mm_free(ptr: *mut u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::sub` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:113:22 [INFO] [stdout] | [INFO] [stdout] 113 | let header_ptr = ptr.sub(SIZE_OF_MEMORY_HEADER_IN_BYTES) as *mut MemoryHeader; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 115 | if (*header_ptr).magic != expected_magic { [INFO] [stdout] | ^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::sub` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:119:22 [INFO] [stdout] | [INFO] [stdout] 119 | let header_ptr = ptr.sub(SIZE_OF_MEMORY_HEADER_IN_BYTES) as *mut MemoryHeader; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | (*header_ptr).free = true; [INFO] [stdout] | ^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `libc::sbrk` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:35:32 [INFO] [stdout] | [INFO] [stdout] 35 | let raw_root_pointer = sbrk(bits_to_allocate as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:123:20 [INFO] [stdout] | [INFO] [stdout] 123 | let mut next = (*header_ptr).next; [INFO] [stdout] | ^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:124:30 [INFO] [stdout] | [INFO] [stdout] 124 | while !next.is_null() && (*next).free { [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | (*header_ptr).size += (*curr).size + SIZE_OF_MEMORY_HEADER; [INFO] [stdout] | ^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:126:31 [INFO] [stdout] | [INFO] [stdout] 126 | (*header_ptr).size += (*curr).size + SIZE_OF_MEMORY_HEADER; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:127:16 [INFO] [stdout] | [INFO] [stdout] 127 | next = (*curr).next; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | (*curr).prev = null_mut(); [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | (*curr).next = null_mut(); [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:133:20 [INFO] [stdout] | [INFO] [stdout] 133 | let mut prev = (*curr).prev; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:134:30 [INFO] [stdout] | [INFO] [stdout] 134 | while !prev.is_null() && (*prev).free { [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | (*prev).size += (*curr).size + SIZE_OF_MEMORY_HEADER; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:40:22 [INFO] [stdout] | [INFO] [stdout] 40 | return_ptr = root_pointer.add(1) as *mut u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:135:25 [INFO] [stdout] | [INFO] [stdout] 135 | (*prev).size += (*curr).size + SIZE_OF_MEMORY_HEADER; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::write` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | / root_pointer.write(MemoryHeader { [INFO] [stdout] 42 | | prev: null_mut(), [INFO] [stdout] 43 | | next: null_mut(), [INFO] [stdout] 44 | | size: size, [INFO] [stdout] 45 | | free: false, [INFO] [stdout] 46 | | magic: return_ptr as isize ^ MAGIC, [INFO] [stdout] 47 | | }); [INFO] [stdout] | |__________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:136:9 [INFO] [stdout] | [INFO] [stdout] 136 | (*curr).next = null_mut(); [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | ROOT = root_pointer; [INFO] [stdout] | ^^^^ use of mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | (*curr).prev = null_mut(); [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:139:16 [INFO] [stdout] | [INFO] [stdout] 139 | prev = (*curr).prev; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `return_ptr` is never read [INFO] [stdout] --> src/mm_alloc.rs:152:17 [INFO] [stdout] | [INFO] [stdout] 152 | let mut return_ptr = null_mut(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: use of mutable static is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:52:24 [INFO] [stdout] | [INFO] [stdout] 52 | let mut curr = ROOT; [INFO] [stdout] | ^^^^ use of mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `mm_alloc::mm_malloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:147:16 [INFO] [stdout] | [INFO] [stdout] 147 | return mm_malloc(size); [INFO] [stdout] | ^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/mm_alloc.rs:143:1 [INFO] [stdout] | [INFO] [stdout] 143 | pub unsafe fn mm_realloc(ptr: *mut u8, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:55:38 [INFO] [stdout] | [INFO] [stdout] 55 | while curr != null_mut() && ((*curr).size < aligned_size || !(*curr).free) { [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `mm_alloc::mm_free` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:149:9 [INFO] [stdout] | [INFO] [stdout] 149 | mm_free(ptr); [INFO] [stdout] | ^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::sub` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:153:26 [INFO] [stdout] | [INFO] [stdout] 153 | let ptr_header = ptr.sub(SIZE_OF_MEMORY_HEADER_IN_BYTES) as *mut MemoryHeader; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:55:70 [INFO] [stdout] | [INFO] [stdout] 55 | while curr != null_mut() && ((*curr).size < aligned_size || !(*curr).free) { [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:57:20 [INFO] [stdout] | [INFO] [stdout] 57 | curr = (*curr).next; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `libc::sbrk` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:61:33 [INFO] [stdout] | [INFO] [stdout] 61 | let block_pointer = sbrk(bits_to_allocate as isize) as *mut MemoryHeader; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:65:26 [INFO] [stdout] | [INFO] [stdout] 65 | return_ptr = block_pointer.add(1) as *mut u8; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:154:27 [INFO] [stdout] | [INFO] [stdout] 154 | let former_size = (*ptr_header).size; [INFO] [stdout] | ^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::write` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:66:13 [INFO] [stdout] | [INFO] [stdout] 66 | / block_pointer.write(MemoryHeader { [INFO] [stdout] 67 | | prev, [INFO] [stdout] 68 | | next: null_mut(), [INFO] [stdout] 69 | | size: aligned_size, [INFO] [stdout] 70 | | free: false, [INFO] [stdout] 71 | | magic: return_ptr as isize ^ MAGIC, [INFO] [stdout] 72 | | }); [INFO] [stdout] | |______________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `mm_alloc::mm_malloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:156:26 [INFO] [stdout] | [INFO] [stdout] 156 | return_ptr = mm_malloc(size); [INFO] [stdout] | ^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::copy` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:157:13 [INFO] [stdout] | [INFO] [stdout] 157 | copy(ptr, return_ptr, former_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:159:13 [INFO] [stdout] | [INFO] [stdout] 159 | (*ptr_header).size = size; [INFO] [stdout] | ^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:73:13 [INFO] [stdout] | [INFO] [stdout] 73 | (*prev).next = block_pointer; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:77:13 [INFO] [stdout] | [INFO] [stdout] 77 | (*curr).free = false; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:78:26 [INFO] [stdout] | [INFO] [stdout] 78 | return_ptr = curr.add(1) as *mut u8; [INFO] [stdout] | ^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:80:16 [INFO] [stdout] | [INFO] [stdout] 80 | if (*curr).size > aligned_size + SIZE_OF_MEMORY_HEADER + ONE_BYTE { [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:81:36 [INFO] [stdout] | [INFO] [stdout] 81 | let current_next = (*curr).next; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:84:42 [INFO] [stdout] | [INFO] [stdout] 84 | let new_next_as_u8_ptr = curr_as_u8_ptr [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 85 | | .add(SIZE_OF_MEMORY_HEADER_IN_BYTES) [INFO] [stdout] 86 | | .add(aligned_size / ONE_BYTE); [INFO] [stdout] | |_________________________________________________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:84:42 [INFO] [stdout] | [INFO] [stdout] 84 | let new_next_as_u8_ptr = curr_as_u8_ptr [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 85 | | .add(SIZE_OF_MEMORY_HEADER_IN_BYTES) [INFO] [stdout] | |________________________________________________________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::write` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:88:17 [INFO] [stdout] | [INFO] [stdout] 88 | / new_next.write(MemoryHeader { [INFO] [stdout] 89 | | prev: curr, [INFO] [stdout] 90 | | next: current_next, [INFO] [stdout] 91 | | size: (*curr).size - (aligned_size + SIZE_OF_MEMORY_HEADER), [INFO] [stdout] 92 | | free: true, [INFO] [stdout] 93 | | magic: new_next.add(1) as isize ^ MAGIC, [INFO] [stdout] 94 | | }); [INFO] [stdout] | |__________________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:91:27 [INFO] [stdout] | [INFO] [stdout] 91 | size: (*curr).size - (aligned_size + SIZE_OF_MEMORY_HEADER), [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:93:28 [INFO] [stdout] | [INFO] [stdout] 93 | magic: new_next.add(1) as isize ^ MAGIC, [INFO] [stdout] | ^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:95:17 [INFO] [stdout] | [INFO] [stdout] 95 | (*curr).next = new_next; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | (*curr).size -= SIZE_OF_MEMORY_HEADER + (*new_next).size [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:96:57 [INFO] [stdout] | [INFO] [stdout] 96 | (*curr).size -= SIZE_OF_MEMORY_HEADER + (*new_next).size [INFO] [stdout] | ^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::add` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:102:19 [INFO] [stdout] | [INFO] [stdout] 102 | let ptr = return_ptr.add(i); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | *ptr = 0; [INFO] [stdout] | ^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `libc::sbrk` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:109:22 [INFO] [stdout] | [INFO] [stdout] 109 | let heap_break = sbrk(0) as *mut u8; [INFO] [stdout] | ^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/mm_alloc.rs:107:1 [INFO] [stdout] | [INFO] [stdout] 107 | pub unsafe fn mm_free(ptr: *mut u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::sub` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:113:22 [INFO] [stdout] | [INFO] [stdout] 113 | let header_ptr = ptr.sub(SIZE_OF_MEMORY_HEADER_IN_BYTES) as *mut MemoryHeader; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:115:8 [INFO] [stdout] | [INFO] [stdout] 115 | if (*header_ptr).magic != expected_magic { [INFO] [stdout] | ^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::sub` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:119:22 [INFO] [stdout] | [INFO] [stdout] 119 | let header_ptr = ptr.sub(SIZE_OF_MEMORY_HEADER_IN_BYTES) as *mut MemoryHeader; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | (*header_ptr).free = true; [INFO] [stdout] | ^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:123:20 [INFO] [stdout] | [INFO] [stdout] 123 | let mut next = (*header_ptr).next; [INFO] [stdout] | ^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:124:30 [INFO] [stdout] | [INFO] [stdout] 124 | while !next.is_null() && (*next).free { [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:126:9 [INFO] [stdout] | [INFO] [stdout] 126 | (*header_ptr).size += (*curr).size + SIZE_OF_MEMORY_HEADER; [INFO] [stdout] | ^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:126:31 [INFO] [stdout] | [INFO] [stdout] 126 | (*header_ptr).size += (*curr).size + SIZE_OF_MEMORY_HEADER; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:127:16 [INFO] [stdout] | [INFO] [stdout] 127 | next = (*curr).next; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:128:9 [INFO] [stdout] | [INFO] [stdout] 128 | (*curr).prev = null_mut(); [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:129:9 [INFO] [stdout] | [INFO] [stdout] 129 | (*curr).next = null_mut(); [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:133:20 [INFO] [stdout] | [INFO] [stdout] 133 | let mut prev = (*curr).prev; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:134:30 [INFO] [stdout] | [INFO] [stdout] 134 | while !prev.is_null() && (*prev).free { [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | (*prev).size += (*curr).size + SIZE_OF_MEMORY_HEADER; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:135:25 [INFO] [stdout] | [INFO] [stdout] 135 | (*prev).size += (*curr).size + SIZE_OF_MEMORY_HEADER; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:136:9 [INFO] [stdout] | [INFO] [stdout] 136 | (*curr).next = null_mut(); [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 137 | (*curr).prev = null_mut(); [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:139:16 [INFO] [stdout] | [INFO] [stdout] 139 | prev = (*curr).prev; [INFO] [stdout] | ^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `return_ptr` is never read [INFO] [stdout] --> src/mm_alloc.rs:152:17 [INFO] [stdout] | [INFO] [stdout] 152 | let mut return_ptr = null_mut(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `mm_alloc::mm_malloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:147:16 [INFO] [stdout] | [INFO] [stdout] 147 | return mm_malloc(size); [INFO] [stdout] | ^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/mm_alloc.rs:143:1 [INFO] [stdout] | [INFO] [stdout] 143 | pub unsafe fn mm_realloc(ptr: *mut u8, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `mm_alloc::mm_free` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:149:9 [INFO] [stdout] | [INFO] [stdout] 149 | mm_free(ptr); [INFO] [stdout] | ^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::sub` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:153:26 [INFO] [stdout] | [INFO] [stdout] 153 | let ptr_header = ptr.sub(SIZE_OF_MEMORY_HEADER_IN_BYTES) as *mut MemoryHeader; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:154:27 [INFO] [stdout] | [INFO] [stdout] 154 | let former_size = (*ptr_header).size; [INFO] [stdout] | ^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `mm_alloc::mm_malloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:156:26 [INFO] [stdout] | [INFO] [stdout] 156 | return_ptr = mm_malloc(size); [INFO] [stdout] | ^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::copy` is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:157:13 [INFO] [stdout] | [INFO] [stdout] 157 | copy(ptr, return_ptr, former_size); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/mm_alloc.rs:159:13 [INFO] [stdout] | [INFO] [stdout] 159 | (*ptr_header).size = size; [INFO] [stdout] | ^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0133`. [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0133`. [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.93s [INFO] running `Command { std: "docker" "inspect" "11283ca8cbc425b7a585d81c039c081947ac768c4564f96f0f207e133167b89e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "11283ca8cbc425b7a585d81c039c081947ac768c4564f96f0f207e133167b89e", kill_on_drop: false }` [INFO] [stdout] 11283ca8cbc425b7a585d81c039c081947ac768c4564f96f0f207e133167b89e