Bug 51238 - Use of "-fomit-frame-pointer" causes segfault
Use of "-fomit-frame-pointer" causes segfault
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-08-08 13:56 EDT by Steve Snyder
Modified: 2007-04-18 12:35 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-02 15:33:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Steve Snyder 2001-08-08 13:56:16 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010803

Description of problem:
Compiling Mozilla (0.9.2/0.9.3) with the "-fomit-frame-pointer" compiler
switch causes a segmentation fault when "regxpcom" is run.

How reproducible:

Steps to Reproduce:
 1. Download (ftp.mozilla.org) and unpack Mozilla SRPM:


2. Edit ~/SPECS/mozilla.  Replace this text (line #113):

    BUILD_OFFICIAL=1 ./configure

  with this text:

    BUILD_OFFICIAL=1 CXXFLAGS="-march=i686 -O2" ./configure

3. Run: "rpm -bb --clean /usr/src/redhat/SPECS/mozilla".

4. The build runs to completion, proving that there are no problems with
the source code or with the switches ("-march=i686 -O2") used.

5. Now edit the spec file again.  Add the "-fomit-frame-pointer" switch:

    BUILD_OFFICIAL=1 CXXFLAGS="-march=i686 -O2 -fomit-frame-pointer"

6. Rebuild: "rpm -bb --clean /usr/src/redhat/SPECS/mozilla".

7. This time the build quits with this output:

    + MOZILLA_FIVE_HOME=/var/tmp/mozilla-root/usr/lib/mozilla
    + ./regxpcom
    /var/tmp/rpm-tmp.46295: line 122:  2197 Segmentation fault      (core
dumped) LD_LIBRARY_PATH=`pwd`:`pwd`/.. MOZILLA_FIVE_HOME=`pwd` ./regxpcom
    error: Bad exit status from /var/tmp/rpm-tmp.46295 (%install)

Actual Results:  Received notification of segmentation fault

Expected Results:  Build should run to completion. generating binary RPM files.

Additional info:

# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)

# rpm -qi binutils | grep Version
Version     :
Comment 1 Steve Snyder 2001-12-27 11:47:20 EST
Well, I guess I'm just talking to myself here, but I'll submit an update anyway.

As seen above, this problem was originally reported on RHL v7.1 and Mozilla
v0.9.3.  The problem still exists on RHL v7.2 and Mozilla 0.9.7.  Same compiler
switches apply: "-march=i686 -O2" works, adding -fomit-frame-pointer causes

Use of the switches is true whether CXXFLAGS is set explicitly as above or
whether implicitly via './configure --enable-optimize="-march=i686 -O2" '.

Updated info:

$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)

$ rpm -qi binutils | grep Version
Version     :

Comment 2 Jakub Jelinek 2004-10-02 15:33:51 EDT
GCC 2.96-RH is too old now, if you can reproduce with contemporary GCCs,
please reopen.

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