Bug 491271 - kernel-rt should be built with -fwrapv [mrg-1.2]
kernel-rt should be built with -fwrapv [mrg-1.2]
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: realtime-kernel (Show other bugs)
All Linux
high Severity high
: 1.2
: ---
Assigned To: Red Hat Real Time Maintenance
David Sommerseth
Depends On:
  Show dependency treegraph
Reported: 2009-03-20 03:43 EDT by Eugene Teo (Security Response)
Modified: 2016-05-22 19:28 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-05-24 21:47:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Upstream patch (1.25 KB, patch)
2009-03-20 03:44 EDT, Eugene Teo (Security Response)
no flags Details | Diff

  None (edit)
Description Eugene Teo (Security Response) 2009-03-20 03:43:56 EDT
Description of problem:
Add '-fwrapv' to gcc CFLAGS. This makes sure that gcc doesn't try to optimize
away wrapping arithmetic, which the kernel occasionally uses for overflow
testing, ie things like

if (ptr + offset < ptr)

which technically is undefined for non-unsigned types. See


for details.

Not all versions of gcc support it, so we need to make it conditional (it looks
like it was introduced in gcc-3.4).

This bug is filed to address the mrg-1.2 kernel. This is not a dup of bug 491264.
Comment 4 Eugene Teo (Security Response) 2009-05-24 21:47:15 EDT
Close as per comment #3. Reopen if needed.

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