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

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

 



On Thu, 01 Dec 2011 15:45:48 +0100
Ralf Corsepius <rc040203@xxxxxxxxxx> wrote:

> On 12/01/2011 11:23 AM, Paul Howarth wrote:
> > Ralf,
> >
> > On 11/18/2011 05:53 PM, Ralf Corsepius wrote:
> >> On 11/18/2011 05:32 PM, Paul Howarth wrote:
> >>> It already builds with -Wall and there are no warnings:
> >> This doesn't mean much.
> >>
> >> Adding a couple of more agressive options, this is what happens to
> >> pptp:
> >>
> 
> > What were the "couple of more agressive options" you used,
> 
> This is what I did (rebased against today's git):
> 
> diff --git a/pptp.spec b/pptp.spec
> index 289dd08..78e36ca 100644
> --- a/pptp.spec
> +++ b/pptp.spec
> @@ -86,7 +86,7 @@ tunnels.
>   perl -pi -e 's/install -o root -m 555 pptp/install -m 755 pptp/;'
> Makefile
> 
>   %build
> -make %{?_smp_mflags} CFLAGS="-Wall %{optflags}" IP=/sbin/ip
> +make %{?_smp_mflags} CFLAGS="-Wall %{optflags} -Wextra 
> -Wstrict-aliasing -Wnested-externs -Wstrict-prototypes" IP=/sbin/ip
> 
>   %install
>   rm -rf %{buildroot}
> 
> 
> > and which
> > distro?
> 
> Local rawhide mock.
> 
> The result I posted was extracted from a "fedpkg mockbuild"'s
> build.log in a local mock on fedora-16/x86_64.
> 
> 
> > I've tried "-Wall -Wextra" and still can't provoke the strict
> > aliasing warning locally.
> -Wstrict-aliasing is responsible for this warning.
> 
> Today's version looks like this:
> 
> # grep warning: results_pptp/1.7.2/13.fc17/build.log  | grep punned
> pptp_gre.c:92:29: warning: dereferencing type-punned pointer might
> break strict-aliasing rules [-Wstrict-aliasing]
> pptp_gre.c:99:28: warning: dereferencing type-punned pointer might
> break strict-aliasing rules [-Wstrict-aliasing]
> pptp_callmgr.c:202:48: warning: dereferencing type-punned pointer
> might break strict-aliasing rules [-Wstrict-aliasing]
> pptp_callmgr.c:325:29: warning: dereferencing type-punned pointer
> might break strict-aliasing rules [-Wstrict-aliasing]
> pptp_callmgr.c:330:28: warning: dereferencing type-punned pointer
> might break strict-aliasing rules [-Wstrict-aliasing]
> pptp_callmgr.c:358:25: warning: dereferencing type-punned pointer
> might break strict-aliasing rules [-Wstrict-aliasing]
> pptp.c:459:33: warning: dereferencing type-punned pointer might break 
> strict-aliasing rules [-Wstrict-aliasing]

This is weird: I can't reproduce these either locally in mock or in
koji:

http://koji.fedoraproject.org/koji/taskinfo?taskID=3555838

Paul.
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux