From: Frans Pop <email@example.com> To: Linux Kernel Mailing List <firstname.lastname@example.org> Cc: email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com Subject: Re: [Bug 13012] 184.108.40.206 causes init to segfault on Debian etch; 220.127.116.11 OK Date: Fri, 10 Jul 2009 09:28:05 +0200 [thread overview] Message-ID: <firstname.lastname@example.org> (raw) On Thu, 9 Apr 2009, Linus Torvalds wrote: > On Thu, 9 Apr 2009, Andrew Morton wrote: > > -fwrapv killed Barry's gcc-4.1.2-compiled kernel in 2.6.27.x, > > 2.6.28.x and presumably 2.6.29, 2.6.30. > > Auughh. I hate compiler bugs. They're horrible to debug. > > I _think_ 'fwrapv' only really matters with gcc-4.3, so maybe we could > just enable it for new versions. > > HOWEVER, I also wonder if we could instead of "-fwrapv" use > "-fno-strict-overflow". They are apparently subtly different, and maybe > the bug literally only happens with -fwrapv. > > Barry, can you see if that simple "replace -fwrapv with > -fno-strict-overflow" works for you? > > Or just go with Barry's helpful debugging: > > > I also noticed that the problem only happens with some gcc's: > > > > > > Problem occurs: > > > gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) > > > gcc-4.1 (GCC) 4.1.3 20080704 (prerelease) (Debian 4.1.2-25) > > > > > > Problem does not occur (i.e. 18.104.22.168 works and I don't have to > > > revert anything): > > > gcc-4.2 (GCC) 4.2.4 (Debian 4.2.4-6) > > > gcc (Debian 4.3.2-1.1) 4.3.2 > > and consider 4.2 to be the point where it's ok. > > Do we have some gcc developer who > (a) knows what the rules are > and > (b) might even help us figure out where the bug occurs? The discussion on issue looks to have died, but it has bitten Debian stable ("Lenny")  as it causes init to die on s390 after a kernel update. Here's a possible patch. The exact gcc version to check for is still a bit open I guess. For the s390 issue I've confirmed that 4.2.4 is OK, but for safety and because of Andrew's comment above I've set the test for 4.3 in the patch. Cheers, FJP  http://bugs.debian.org/536354 --- From: Frans Pop <email@example.com> Subject: Only add '-fwrapv' to gcc CFLAGS for gcc 4.3 and later This flag has been shown to cause init to segfault for kernels compiled with gcc-4.1. gcc version 4.2.4 has been shown to be OK, but as there is some uncertainty the flag is only added for 4.3 and later. This fixes http://bugzilla.kernel.org/show_bug.cgi?id=13012. Reported-by: Barry K. Nathan <firstname.lastname@example.org> Signed-off-by: Frans Pop <email@example.com> diff --git a/Makefile b/Makefile index 0aeec59..2f8756e 100644 --- a/Makefile +++ b/Makefile @@ -565,7 +565,8 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) # disable invalid "can't wrap" optimizations for signed / pointers -KBUILD_CFLAGS += $(call cc-option,-fwrapv) +KBUILD_CFLAGS += $(shell if [ $(call cc-version) -ge 0430 ]; then \ + echo $(call cc-option,-fwrapv); fi ;) # revert to pre-gcc-4.4 behaviour of .eh_frame KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
next reply other threads:[~2009-07-10 7:28 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-07-10 7:28 Frans Pop [this message] 2009-07-10 14:59 ` Frans Pop 2009-07-12 17:58 ` Linus Torvalds 2009-07-12 17:58 ` Linus Torvalds 2009-07-12 18:24 ` Linus Torvalds 2009-07-13 5:29 ` Ian Lance Taylor 2009-07-25 3:23 ` Dave Jones 2009-07-25 16:49 ` Linus Torvalds 2009-07-10 20:05 ` [PATCH,v2] Only add '-fwrapv' to gcc CFLAGS for gcc 4.2 and later Frans Pop 2009-07-17 22:18 ` Sam Ravnborg 2009-07-17 22:43 ` Frans Pop 2009-07-18 6:59 ` Sam Ravnborg 2009-07-23 12:46 ` Frans Pop 2009-07-23 14:27 ` Sam Ravnborg
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [Bug 13012] 22.214.171.124 causes init to segfault on Debian etch; 126.96.36.199 OK' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.