Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 556962

Summary: g++44 code crashes when compiled with -O2 -fPIC and -O3 -fPIC
Product: Red Hat Enterprise Linux 5 Reporter: Alan Matsuoka <alanm>
Component: gcc44Assignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: high Docs Contact:
Priority: high    
Version: 5.4CC: jason, mnewsome, mpolacek, pmuller
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gcc44-4.4.7-1.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 826882 (view as bug list) Environment:
Last Closed: 2013-01-08 07:14:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 743405, 807971, 826882    
Attachments:
Description Flags
test_long.cc none

Description Alan Matsuoka 2010-01-19 22:35:37 UTC
Description of problem:
The attached test_long.cc test program if compiled with -fPIC  -O2 and up will core dump at run time. Works with "-O1". Or if we use:
typedef signed int Cpp_Long;
It will work with "-O3" option but not -fPIC -O3

How reproducible:
[tammy@sjfql268v542 src]$ g++44 -fPIC -O2 test_long.cc
[tammy@sjfql268v542 src]$ ./a.out
0: 0: Plx_TopbottomEnlargementNoneName
1: 1: Plx_TopbottomEnlargementRName
2: 2: Plx_TopbottomEnlargementCName
3: 3: Plx_TopbottomEnlargementRCName
Segmentation fault

Steps to Reproduce:
see above

Actual results:
core dump with "-fPIC -O2" or up.

Expected results:
0: 0: Plx_TopbottomEnlargementNoneName
1: 1: Plx_TopbottomEnlargementRName
2: 2: Plx_TopbottomEnlargementCName
3: 3: Plx_TopbottomEnlargementRCName
ERROR: 4

Additional info:

Comment 1 Alan Matsuoka 2010-01-19 22:36:40 UTC
Created attachment 385550 [details]
test_long.cc

Comment 10 Jakub Jelinek 2010-07-01 17:49:30 UTC
This is in 4.6 now, but not backported yet.

Comment 15 RHEL Program Management 2012-04-02 10:31:04 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 28 errata-xmlrpc 2013-01-08 07:14:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0030.html