Bug 166237

Summary: gcc generates bad exception handling code
Product: Red Hat Enterprise Linux 4 Reporter: Dr Thomas Conway <drtomc>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2006-0125 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-07 18:45:41 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: 168429    
Attachments:
Description Flags
Some notes showing the bad assembler.
none
A valid c++ source file that yields incorrect assembler. none

Description Dr Thomas Conway 2005-08-18 07:38:27 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc3 Firefox/1.0.6

Description of problem:
gcc was invoked with the flags -Wno-ctor-dtor-privacy -m64 -w -pipe -fmessage-length=0 -O2 and generated bad exception handling code. Leaving off the -O2 results in correct code.

When the bad code is run and an exception is thrown, the code crashed as a result of calling free() with a bad value (0x01).

The bad assembler with a detailed analysis will be attached directly.

Version-Release number of selected component (if applicable):
gcc-3.4.3-9.EL4

How reproducible:
Always

Steps to Reproduce:
At this stage, we don't have a useful repro that we can ship (cutting down the ~1,000,000 lines to something we can send will be a nontrivial task).

Additional info:

Comment 1 Dr Thomas Conway 2005-08-18 07:39:54 UTC
Created attachment 117862 [details]
Some notes showing the bad assembler.

Comment 2 Jakub Jelinek 2005-08-18 12:31:11 UTC
I tried to reproduce this with a simple testcase, but did not manage to do that.
So a self-contained testcase is a must before we can make any progress on this.

Comment 3 Dr Thomas Conway 2005-08-19 05:56:50 UTC
Well, I've spent all day creating a stand-alone repro. The code I've got
(attached) isn't an executable, but if you examine the assembler it has the same
fault. The place to look for is the call to the C1::C1(...) constructor.

Tom.

Comment 4 Dr Thomas Conway 2005-08-19 05:57:48 UTC
Created attachment 117898 [details]
A valid c++ source file that yields incorrect assembler.

Comment 6 Dr Thomas Conway 2005-09-05 22:57:18 UTC
Brilliant. Is there an ETA for the patches to hit EL4?

Tom

Comment 7 Jakub Jelinek 2005-09-06 10:41:40 UTC
In RHEL4 U3.

Comment 13 Red Hat Bugzilla 2006-03-07 18:45:41 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0125.html