Layout randomization
Layout randomization
Posted Oct 10, 2024 12:06 UTC (Thu) by Wol (subscriber, #4433)In reply to: Layout randomization by taladar
Parent article: Kernel developers at Cauldron
As always, I think the wrong language is being used ...
What developers used to do - maybe still should - is stick a bunch of "assert"s just after your function is called (to document your pre-requisites), and a similar bunch of asserts just before a return to document your post-requisites (call those guarantees if you like).
Effectively you're saying "this is what I need to function correctly, this is what I guarantee if everything works as designed". To what extent that's massively comprehensive is down to you, but if somebody then comes and says "your function left this data structure in a mess", you can then go back and say "where's the assert that checks what you want?". If it's not in your code, "not your problem". If it is in your code, where the **** did it get corrupted?
Cheers,
Wol
Posted Oct 10, 2024 18:55 UTC (Thu)
by segher (subscriber, #109337)
[Link] (1 responses)
This is *the* core thing a compiler does. Not trusting compiler developers to do their job is very offensive.
Posted Oct 11, 2024 7:56 UTC (Fri)
by taladar (subscriber, #68407)
[Link]
Layout randomization
Layout randomization