Bug 55568 - gcc-2.96-98 compiles bad code into glibc-2.2.4-13
Summary: gcc-2.96-98 compiles bad code into glibc-2.2.4-13
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.2
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2001-11-02 05:51 UTC by Paul Pluzhnikov
Modified: 2007-04-18 16:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2002-07-26 21:47:27 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2002:055 contract SHIPPED_LIVE Updated version of GCC 2.96-RH now available 2002-04-02 05:00:00 UTC

Description Paul Pluzhnikov 2001-11-02 05:51:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Description of problem:
Glibc, as shipped with RedHat 7.2 i686 contains code that accesses the 
wrong side of %esp (which is async-signal unsafe)

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

How reproducible:

Steps to Reproduce:
1. gdb /lib/i686/libc.so.6
2. disas __mpn_construct_double

Actual Results:  
0x55660 <__mpn_construct_double>:       push   %ebp
0x55661 <__mpn_construct_double+1>:     mov    %esp,%ebp
0x55663 <__mpn_construct_double+3>:     mov    0x10(%ebp),%eax
0x55666 <__mpn_construct_double+6>:     push   %edi
0x55667 <__mpn_construct_double+7>:     mov    %edi,%edx
0x55669 <__mpn_construct_double+9>:     and    $0x7fffffff,%edx
0x5566f <__mpn_construct_double+15>:    push   %esi
... instructions that do not affect %esp (currently == %ebp-8)
0x5569b <__mpn_construct_double+59>:    mov    %esi,0xfffffff0(%ebp)
... above instruction saves %esi at [%ebp-16] -- 
... on the wrong side of %esp ...
... any interrupt between here and:
0x556b4 <__mpn_construct_double+84>:    fldl   0xfffffff0(%ebp)
... will cause incorrect result

Additional info:

Using RedHat 7.2 (Enigma)

Comment 1 Jakub Jelinek 2002-02-14 23:13:54 UTC
Should be fixed in gcc-2.96-103, currently at:

Comment 2 Wan-Teh Chang 2002-02-15 00:40:20 UTC
I am not familiar with the Red Hat Linux RPMs, but at
ftp://people.redhat.com/jakub/gcc/2.96-103/, I did not
find anything that looks like an RPM for libc.so.6.

Will there be an official Red Hat Linux 7.2 update that
includes a recompiled libc.so.6?

Comment 3 Bill Nottingham 2002-07-26 21:47:27 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.


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