On 2025-01-18 Paul Eggert wrote:
> Does the unaligned read trick work even with CheriBSD's memory-safe
> model? That is an edge case that might need an ifdef or something.
I'm not familiar with CheriBSD but the trick never crosses a cache line
boundary (or page boundary). So the memory-safe model has to be really
strict to not allow it.
> The aligned read trick reminds me a bit of the "adding 0 to a null
> pointer gives you a null pointer" trick. That also is a violation of
> ISO C but it works everywhere (even on CheriBSD) and Gnulib assumes
> it in places.
Oh that...
https://github.com/tukaani-project/xz/commit/30e95bb44c36ae26b2ab12a94343b215fec285e7
I heard the standardization news last year. It was a nice surprise.
--
Lasse Collin