Bart's suggestion to build release build regularly

Andreas Pakulat apaku at gmx.de
Mon Dec 27 17:45:59 UTC 2010


On 27.12.10 16:34:47, Thomas Lübking wrote:
> Am Monday 27 December 2010 schrieb Mark Kretschmann:
> > Maybe because of compiler optimizing?
> yes, likely.
> esp. invaildated stack/heap can be (not "are") shadowed by debug builds, 
> because the memory is (often) not garbaged so fast (less packed code, later 
> internal "free for use" because of trace requirements)
> 
> eg.
> QString &string()
> {
> 	return QString("dummy");
> }
> 
> if ( string().isEmpty() )
> ....
> 
> might work on debug builds w/o any problem ever, but might as well crash on 
> aggressively optimized builds reproducably (as the reference is invalid 
> immediately after the function exits, but _might_ stay "clean" for some more 
> time) ... in a way alos depending on the system load.
> 
> Tbf, this is a very obvious one and gcc will also warn you about ;-)

One other thing are assert's with side-effects (not sure wether this also
applies to kDebug), as the code of the assert is not executed at all in
release builds.

And optimized code could lead to cases where race-conditions are hit more
often...

Andreas

-- 
Your supervisor is thinking about you.



More information about the Amarok mailing list