You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting a double free when splitting on the first element in the list:
#[test]
fn test_double_free() {
let mut list = LinkedList::new();
list.push_back(7);
list.push_back(8);
list.push_back(9);
let mut cur = list.cursor_mut();
cur.move_next();
cur.split_before();
}
(╯°□°)╯︵ ┻━┻
The text was updated successfully, but these errors were encountered:
The bug is when you are pointing at the first node and you call split_before
// We have this:
//
// list.front -> A <-> B <-> C <-> D <- list.back
// ^
// cur
//
//
// And we want to produce this:
//
// list.front -> A -> C <-> D <- list.back
// ^
// cur
//
//
// return.front -> None <- return.back
We don't set front and back to None in this case. The length is right (it's 0), but front and back point to a node.
I am getting a double free when splitting on the first element in the list:
(╯°□°)╯︵ ┻━┻
The text was updated successfully, but these errors were encountered: