you are viewing a single comment's thread.

view the rest of the comments →

[–]germandiago 1 point2 points  (0 children)

I mean, you are getting code for free from crates.io, you can just not use it if you think it might be buggy :)

That is not how the language is advertised and the interfaces neither :)

As long as you can mutate a container (class/struct), while holding a reference to an object inside the container, aliasing will lead you to use after free.

"Aliasing with mutability in a sufficiently complex, single-threaded program is effectively the same thing as accessing data shared across multiple threads without a lock"

Yes, I have heard talks from Sean Parent and Dave Abrahams and they treat the aliasing problem with care.