On 18/03/2019 18:19, Robin Murphy wrote:
For the context bank reset, yes, I am assuming that no complier will
ever be perverse enough to detect that cfg is not written after the
NULL check and immediately reallocate it to XZR for no good reason.
I'd like to think that assumption is going to hold for the reasonable
scope of this particular workaround, though.
I'm not sure I understand the above paragraph.
In code such as:
if (val == 0) foo(val);
gcc's algorithm is likely to figure out that the code is equivalent to
if (val == 0) foo(0)
and perform constant-propagation, etc.
Is that what we're talking about?