Bart's suggestion to build release build regularly

Thomas Lübking thomas.luebking at web.de
Mon Dec 27 15:34:47 UTC 2010


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 ;-)

Thomas



More information about the Amarok mailing list