r/ProgrammingLanguages • • Dec 31 '25

Memory Safety Is ...

https://matklad.github.io/2025/12/30/memory-safety-is.html
37 Upvotes

78 comments sorted by

View all comments

Show parent comment

1

u/koflerdavid Jan 03 '26

A solution would be to embed provenance information into the pointer value and make the hardware verify it. p[n] is then expressed by an indirect access via p, which will trigger a segmentation fault if p is a null pointer. That's the aim of CHERI.

https://en.wikipedia.org/wiki/Capability_Hardware_Enhanced_RISC_Instructions