Losing the magic
Losing the magic
Posted Dec 14, 2022 17:10 UTC (Wed) by mathstuf (subscriber, #69389)In reply to: Losing the magic by adobriyan
Parent article: Losing the magic
It means that the value being represented is not trackable in the C abstract machine and therefore no assumptions can be made about it. Because no assumptions can be made, optimizers are hard-pressed to do much of anything about it because the "as-if" rule is likely impossible to track accurately.
However, given that this is trivially detectable as about-to-be-freed memory, I don't know what kind of rules exist around "volatile values living in C-maintained memory" might allow even this to still be seen as a dead store and unobservable via UAF == UB.
