help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimization breaks program


From: Maurizio Loreti
Subject: Re: Optimization breaks program
Date: 28 Apr 2004 12:22:02 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Paul Schneider <paulibaer@uboot.com> writes:

> With optimization turned to O1, O2, or O3, I get segfaults with my
> program. With no optimization everything runs fine. Is this a common
> thing to happen?

Yes.  The optimizer generates a different memory layout, and may
evidence software errors (uninitialised variables, arrays accessed
out-of-bounds, damaged malloc arena, ...) unnoticed with -O0 .

-- 
Maurizio Loreti                         http://www.pd.infn.it/~loreti/mlo.html
Dept. of Physics, Univ. of Padova, Italy              ROT13: ybergv@cq.vasa.vg


reply via email to

[Prev in Thread] Current Thread [Next in Thread]