[coreboot] printk and side effects

Myles Watson mylesgw at gmail.com
Sat Apr 17 22:41:01 CEST 2010

> > 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 appreciate that feature more now :)
> > 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?

I'm trying to track down a bug that's seems to be sensitive to stack
alignment, but I am having a hard time isolating it.  I think it's specific
to my setup.


More information about the coreboot mailing list