Bug 55568

Summary: gcc-2.96-98 compiles bad code into glibc-2.2.4-13
Product: [Retired] Red Hat Linux Reporter: Paul Pluzhnikov <paul>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: wtc
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-07-26 21:47:27 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:

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):
glibc-2.2.4-13
gcc-2.96-98

How reproducible:
Always

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

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:
ftp://people.redhat.com/jakub/gcc/2.96-103/

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.

http://rhn.redhat.com/errata/RHBA-2002-055.html