←back to thread

The provenance memory model for C

(gustedt.wordpress.com)
225 points HexDecOctBin | 1 comments | | HN request time: 0.229s | source
Show context
b0a04gl ◴[] No.44424206[source]
provenance model basically turns memory back into a typed value. finally malloc wont just be a dumb number generator, it'll act more like a capability issuer. and access is not 'is this address in range' anymore, but “does this pointer have valid provenance”. way more deterministic, decouples gcc -wall
replies(1): >>44424492 #
HexDecOctBin ◴[] No.44424492[source]
Will this create more nasal demons? I always disable strict aliasing, and it's not clear to me after reading the whole article whether provenance is about making sane code illegal, or making previously illegal sane code legal.
replies(3): >>44424935 #>>44425068 #>>44425399 #
1. layer8 ◴[] No.44425068[source]
This is basically a formalization of the general understanding one already had when reading the C standard thoroughly 25 years ago. At least I was nodding along throughout the article. It cleans up the parts where the standard was too imprecise and handwavy.