-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Stack overflow at runtime when using Rc<RefCell<T>> in cycle detection algorithm #132263
Comments
Removing the #93555 0x00005555555607c6 in RefCell<CycleNode>::eq (self=0x5555555f8c70, other=0x5555555f8c70)
// 2nd cycle ↑
#93556 0x000055555555fbaf in Rc<RefCell<CycleNode>>::eq (self=0x5555555f8cd8, other=0x5555555f8cd8)
#93557 0x000055555555fb63 in Rc<RefCell<CycleNode>>::eq (self=0x5555555f8cd8, other=0x5555555f8cd8)
#93558 0x0000555555564573 in Option<Rc<RefCell<CycleNode>>>::eq (self=0x5555555f8cd8, other=0x5555555f8cd8)
#93559 0x000055555555f864 in CycleNode::eq (self=0x5555555f8cd8, other=0x5555555f8cd8)
#93560 0x00005555555607c6 in RefCell<CycleNode>::eq (self=0x5555555f8cd0, other=0x5555555f8cd0)
#93561 0x000055555555fbaf in Rc<RefCell<CycleNode>>::eq (self=0x5555555f8ca8, other=0x5555555f8ca8)
#93562 0x000055555555fb63 in Rc<RefCell<CycleNode>>::eq (self=0x5555555f8ca8, other=0x5555555f8ca8)
#93563 0x0000555555564573 in Option<Rc<RefCell<CycleNode>>>::eq (self=0x5555555f8ca8, other=0x5555555f8ca8)
#93564 0x000055555555f864 in CycleNode::eq (self=0x5555555f8ca8, other=0x5555555f8ca8)
#93565 0x00005555555607c6 in RefCell<CycleNode>::eq (self=0x5555555f8ca0, other=0x5555555f8ca0)
#93566 0x000055555555fbaf in Rc<RefCell<CycleNode>>::eq (self=0x5555555f8c78, other=0x5555555f8c78)
#93567 0x000055555555fb63 in Rc<RefCell<CycleNode>>::eq (self=0x5555555f8c78, other=0x5555555f8c78)
#93568 0x0000555555564573 in Option<Rc<RefCell<CycleNode>>>::eq (self=0x5555555f8c78, other=0x5555555f8c78)
#93569 0x000055555555f864 in CycleNode::eq (self=0x5555555f8c78, other=0x5555555f8c78)
#93570 0x00005555555607c6 in RefCell<CycleNode>::eq (self=0x5555555f8c70, other=0x5555555f8c70)
// 1st cycle ↑
#93571 0x000055555555fbaf in Rc<RefCell<CycleNode>>::eq (self=0x7fffffffe040, other=0x7fffffffe048)
#93572 0x000055555555fb63 in Rc<RefCell<CycleNode>>::eq (self=0x7fffffffe040, other=0x7fffffffe048)
#93573 0x0000555555564573 in Option<Rc<RefCell<CycleNode>>>::eq (self=0x7fffffffe040, other=0x7fffffffe048)
#93574 0x000055555555f4ae in issue_132263::main () As impl PartialEq for CycleNode {
fn eq(&self, other: &CycleNode) -> bool {
(match (&self.next, &other.next) {
(Some(x), Some(y)) => Rc::ptr_eq(x, y),
(None, None) => true,
_ => false,
}) && self.pos == other.pos
}
} @rustbot label -C-bug -needs-triage |
that's very helpful and impressive, thanks!!! |
I don't see any indication of a double free, or any other kind of bug in Rust or rustc here so I'm going to close this. |
I tried this code:
I expected to see this happen: success
Instead, this happened:
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: