Skip to content
TILens What matters today in tech v0.3.2
Theme

Topic - Edition

Rust

3 items on 30 Oct 2026
Rust

Encountered invalid memory reference while removing nodes

#[derive(Debug)] struct Node<T> { data: T, next: Mutex<*mut Node<T>>, } #[derive(Debug)] pub struct List<T> { head: Mutex<*mut Node<T>>, } every node in this List is Box::into_rawed. I encountered an invalid memory…

Source: Rust Users Forum okkotsu