Provenance in Eight Bytes: How rustc Packs a Pointer's Identity
rustc packs pointer provenance into a NonZero u64 with two flag bits, and stores the provenance of an allocation as sorted whole-pointer relocations rather than per-byte metadata.
rustc packs pointer provenance into a NonZero u64 with two flag bits, and stores the provenance of an allocation as sorted whole-pointer relocations rather than per-byte metadata.
rustc’s init mask starts as a single boolean meaning fully-initialised or fully-uninitialised, materialises a bitmap only on partial writes, and de-materialises again when a full …
rustc’s const evaluator is a generic interpreter over a Machine trait; Miri instantiates it with provenance tracking and CTFE with a simpler one, and both get the same 8k lines of …
Rust’s str validation is word-at-a-time: it reads two usize at a time looking for high bits, so pure-ASCII strings are validated at 16 bytes per iteration instead of one.
Rust’s stable sort implements the powersort merge-tree heuristic from Munro and Wild, with the depth of each merge node computed as the leading zeros of an XOR of scaled midpoints.