Bug 88613 - RHAS2.1 gcc-2.96-116 creates executable that segfault
RHAS2.1 gcc-2.96-116 creates executable that segfault
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: gcc (Show other bugs)
2.1
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-11 09:35 EDT by SNS Enterprises
Modified: 2007-11-30 17:06 EST (History)
2 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description SNS Enterprises 2003-04-11 09:35:18 EDT
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 13:18:16 EDT
What is going on with this?
Comment 2 Tom Honermann 2003-05-13 19:14:05 EDT
Hello, my name is Tom Honermann.  I too am experiencing this problem.
Comment 3 Bill Peck 2003-05-29 21:05:35 EDT
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.