News for hackers. Stuff that matters.
Re:Compiling C to Safe Rust, Formalized by zozbot234 on Saturday December 21, 2024 @04:58PM (#42482663)
You can do a lot better than that. You can treat memory ranges coming from separate allocations as distinct segments, and pointers as tuples of a segment ID and a linear offset within the segment. This is essentially what systems like CHERI are built on, and how C and C++ are implemented on segmented architectures like the 8086 and 80286. The C standard includes a somewhat limited notion of "objects" that's intended to support this exact case.

There are no comments on this comment yet.