Package segfaults when built with -O2 but not with -O0
Ralf Corsepius
rc040203 at freenet.de
Thu Dec 1 14:45:48 UTC 2011
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]
Ralf
More information about the devel
mailing list