Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 88613 - RHAS2.1 gcc-2.96-116 creates executable that segfault
Summary: RHAS2.1 gcc-2.96-116 creates executable that segfault
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: gcc
Version: 2.1
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-04-11 13:35 UTC by SNS Enterprises
Modified: 2007-11-30 22:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-05-30 01:05:35 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2003:149 0 normal SHIPPED_LIVE Updated gcc packages available 2003-05-29 04:00:00 UTC

Description SNS Enterprises 2003-04-11 13:35:18 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

Description of problem:
Stock RHAS2.1,

binutils-2.11.90.0.8-12
cpp-2.96-116.7.2
gcc-2.96-116.7.2
gcc-c++-2.96-116.7.2
glibc-2.2.4-31.7
glibc-devel-2.2.4-31.7
libstdc++-2.96-116.7.2
libstdc++-devel-2.96-116.7.2

When this code:

// Uncomment any ONE of the ofstream declarations.
// Then compile and run.  With -O it SEGVs, but
// with no -O it runs fine.

#include <fstream>
int main(int argc, char **argv)
{
  std::ofstream xo("bug.out");
  //std::ofstream xo("/dev/stdout");
  //std::ofstream xo("/dev/fd/1");
  //std::ofstream xo(1);
  //std::ofstream xo; xo.attach(1);
  xo << "Hello world." << std::endl;
  return 0;
}

is compiled with -O, the created executable produces Segmentation fault. 
Without -O, the excutable functions normally. 

BTW, it works on a 7.3 system with gcc-2.96-112

Version-Release number of selected component (if applicable):
gcc-2.96-116

How reproducible:
Always

Steps to Reproduce:
1.compile with/without -O
2.run
    

Actual Results:  without -O it works, with it dumps

Expected Results:  should always work

Additional info:

This is critical. We have RHAS support contract, and i am persuing that avenue
as well, but i am not sure where it will lead me.

Comment 1 SNS Enterprises 2003-04-18 17:18:16 UTC
What is going on with this?

Comment 2 Tom Honermann 2003-05-13 23:14:05 UTC
Hello, my name is Tom Honermann.  I too am experiencing this problem.

Comment 3 Bill Peck 2003-05-30 01:05:35 UTC
An errata 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-2003-149.html



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