Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DoubleLinkedList implementation violates aliasing rules #587

Open
F001 opened this issue Feb 2, 2017 · 2 comments
Open

DoubleLinkedList implementation violates aliasing rules #587

F001 opened this issue Feb 2, 2017 · 2 comments
Labels

Comments

@F001
Copy link

F001 commented Feb 2, 2017

Refer to : rust-lang/rust#34417

In std, the linked list was implemented based on Box type. But it's wrong.

Box uses Unique, which requires that it "the referent of the pointer should not be modified without a unique path to the Unique reference". This effectively means that Unique doesn't allow aliases, but this rule violated by the prev pointer which point to the same node as a Unique.

@Hoverbear Hoverbear added the bug label Feb 2, 2017
@kpp
Copy link

kpp commented Apr 26, 2019

Is this fix you are looking for rust-lang/rust#60072?

@F001
Copy link
Author

F001 commented Apr 29, 2019

No. I was referring to rust-lang/rust#34608 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants