Hacker News new | ask | show | jobs
by mbrock 3 days ago
Fil-C's understanding of memory safety is not "its own" idiosyncratic made up definition. Memory safety in the whole tradition that includes CHERI etc is defined in terms of objects and allocations. In C structs and arrays are not object boundaries. So CHERI will have the same semantics as Fil-C in your struct example, unless you enable a compatibility-breaking mode, which Fil-C could very plausibly acquire too, at the same cost of breaking semantic compatibility with the C/C++ semantics.
1 comments

C absolutely has struct, array, and subobject boundaries. The example is already undefined behavior in C.
In the ISO standard, yeah, but that's not how C actually works.