Package segfaults when built with -O2 but not with -O0

Paul Howarth paul at city-fan.org
Fri Nov 18 18:56:49 UTC 2011


On Fri, 18 Nov 2011 18:43:30 +0200
Jussi Lehtola <jussilehtola at fedoraproject.org> wrote:

> On Fri, 18 Nov 2011 16:32:23 +0000
> Paul Howarth <paul at city-fan.org> wrote:
> > On Fri, 18 Nov 2011 15:28:27 +0000
> > Andrew Haley <aph at redhat.com> wrote:
> > 
> > > On 11/18/2011 11:31 AM, Paul Howarth wrote:
> > > > One of my packages, pptp, suffers occasional segfaults as
> > > > reported in http://bugzilla.redhat.com/749455. However, whilst
> > > > investigating this, it seems to be the case that simply
> > > > rebuilding the package using no optimization (-O0) as opposed to
> > > > the default -O2 is enough to stop this happening.
> 
> (clip)
> 
> > > This is unlikely to be a gcc bug.
> > > 
> > > Does the upstream package segfault?
> > 
> > Upstream's Makefile uses -O0 and doesn't appear to segfault
> > (probably as a result).
> > 
> > Paul.
> 
> .. but https://bugzilla.redhat.com/show_bug.cgi?id=749455 it's shown
> that the upstream makefile uses "-Wall -O -Wuninitialized -g".
> According to the gcc man page, -O is equal to -O1.

Ah, I could have sworn it explicitly said "-O0".

More importantly, the bug reporter now tells me that the -O0 build has
now segfaulted - it just took longer to happen that way. So I'll go
back to more conventional debugging now. Thanks anyway.

Paul.


More information about the devel mailing list