Bug 512650 - kernel: use -fno-strict-overflow instead of -fwrapv [rhel-5.4]
kernel: use -fno-strict-overflow instead of -fwrapv [rhel-5.4]
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
high Severity high
: rc
: ---
Assigned To: Danny Feng
Red Hat Kernel QE team
Depends On:
Blocks: 512652 512653
  Show dependency treegraph
Reported: 2009-07-20 03:44 EDT by Eugene Teo (Security Response)
Modified: 2013-01-10 21:32 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 512652 512653 (view as bug list)
Last Closed: 2009-07-29 03:59:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
posted patch (583 bytes, patch)
2009-07-28 21:36 EDT, Danny Feng
no flags Details | Diff

  None (edit)
Description Eugene Teo (Security Response) 2009-07-20 03:44:42 EDT
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:

I suspect the gcc problem is this:

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:
Comment 1 Eugene Teo (Security Response) 2009-07-20 03:49:08 EDT
Related to bug 491266.
Comment 5 Danny Feng 2009-07-28 21:36:09 EDT
Created attachment 355478 [details]
posted patch

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