[coreboot] printk and side effects
Stefan Reinauer
stefan.reinauer at coresystems.de
Sat Apr 17 20:25:05 CEST 2010
On 17.04.2010, at 16:41, Myles Watson <mylesgw at gmail.com> wrote:
> This is a reminder to myself in case it is obvious to everyone else:
>
> It seems very difficult to guarantee that the removal/insertion of a
> print statement has no other effects.
Thanks for sharing this kind of information. This is definitely not
obvious and people need to be aware of it.
I have seen similar side effects with printk too which lead to our
current printk which evaluates the varargs, even if the maximum log
level is below the printk's ...
> I printed out the location of a variable, and that changed where it
> was stored (from a register to being placed on the stack)...
>
> This might not be a traditional "side effect", but it changed the
> behavior of the code and surprised me.
In which way was the behavior changed? Anything we can watch out for?
Stefan
More information about the coreboot
mailing list