Bug 512650 - kernel: use -fno-strict-overflow instead of -fwrapv [rhel-5.4]
Summary: kernel: use -fno-strict-overflow instead of -fwrapv [rhel-5.4]
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.4
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Danny Feng
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks: 512652 512653
TreeView+ depends on / blocked
 
Reported: 2009-07-20 07:44 UTC by Eugene Teo (Security Response)
Modified: 2013-01-11 02:32 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 512652 512653 (view as bug list)
Environment:
Last Closed: 2009-07-29 07:59:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
posted patch (583 bytes, patch)
2009-07-29 01:36 UTC, Danny Feng
no flags Details | Diff

Description Eugene Teo (Security Response) 2009-07-20 07:44:42 UTC
Description of problem:
[PATCH] Don't use '-fwrapv' compiler option: it's buggy in gcc-4.1.x

This causes kernel images that don't run init to completion with certain broken gcc versions.

This fixes kernel bugzilla entry:
	http://bugzilla.kernel.org/show_bug.cgi?id=13012

I suspect the gcc problem is this:
	http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28230

Fix the problem by using the -fno-strict-overflow flag instead, which not only does not exist in the known-to-be-broken versions of gcc (it was introduced later than fwrapv), but seems to be much less disturbing to gcc too: the difference in the generated code by -fno-strict-overflow are smaller (compared to using neither flag) than when using -fwrapv.

Upstream commit:
http://git.kernel.org/linus/a137802ee839ace40079bebde24cfb416f73208a

Comment 1 Eugene Teo (Security Response) 2009-07-20 07:49:08 UTC
Related to bug 491266.

Comment 5 Danny Feng 2009-07-29 01:36:09 UTC
Created attachment 355478 [details]
posted patch


Note You need to log in before you can comment on or make changes to this bug.