|
|
Log in / Subscribe / Register

Beingessner: Rust's Unsafe Pointer Types Need An Overhaul

Beingessner: Rust's Unsafe Pointer Types Need An Overhaul

Posted Mar 22, 2022 19:10 UTC (Tue) by khim (subscriber, #9252)
In reply to: Beingessner: Rust's Unsafe Pointer Types Need An Overhaul by uecker
Parent article: Beingessner: Rust's Unsafe Pointer Types Need An Overhaul

It's one of half-dozen attempts. It's not yet fully finished and it's not clear if it even can be finished and adopted.

Rust's issue lies precisely with the fact that there are no C or C++ memory model which can be used to write code which would then be actually compiled (yes, there are some memory model specified by standard, but we know that compilers are happy to break certain valid programs based on that memory model, examples are actually in the proposal you are linking).

If there would have been some memory model which would have matched what the actual compilers are doing unsafe Rust would have just used that. But there are nothing, just a DR260 resolutions which prompts compiler developers to develop something and include it in the standard… and lots of handwaving.


to post comments

Beingessner: Rust's Unsafe Pointer Types Need An Overhaul

Posted Mar 23, 2022 13:26 UTC (Wed) by uecker (guest, #157556) [Link]

It is an attempt which addresses provenance and has been agreed on to become a technical specification. If compilers support it (they already do to a large extend - modulo some known optimizer bugs and some cases where they already do not follow the standard) and no serious objections come up this will likely be adopted to be the C semantics for provenance.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds