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.
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.
Thanks, Myles
On 17.04.2010, at 16:41, Myles Watson mylesgw@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
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.
Thanks, Myles
On Sat, Apr 17, 2010 at 2:41 PM, Myles Watson mylesgw@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. 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.
Luckily it was specific to my hardware setup, not a bug in Coreboot.
Thanks, Myles