Bug 28509 - gcc-2.96-75 miscompiles rpm
Summary: gcc-2.96-75 miscompiles rpm
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.3
Hardware: alpha Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-20 22:00 UTC by Jeff Johnson
Modified: 2007-04-18 16:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-22 09:38:28 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Debugging patch to display miscompilation. (1.26 KB, patch)
2001-02-20 22:03 UTC, Jeff Johnson
no flags Details | Diff

Description Jeff Johnson 2001-02-20 22:00:26 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.16-24 alpha)


gcc-2.96-75 (and most versions since Red Hat 7.0) has been miscompiling
rpm.

Reproducible: Always
Steps to Reproduce:
1. Apply patch to rpm-4.0.2-7x.src.rpm, build and install
2. Attempt to do "rpm --checksig signed package here"
3. Examine debugging output., the short in lead.signature_type has several
values, mostly wrong.

Comment 1 Jeff Johnson 2001-02-20 22:03:07 UTC
Created attachment 10580 [details]
Debugging patch to display miscompilation.

Comment 2 Jakub Jelinek 2001-02-20 22:48:35 UTC
I get with both -O2 and -O0 build:
*** readLead: signature_type 5
*** rpmCheckSig, after readLead: lead.signature_type 5
*** rpmCheckSig, before rpmReadSignature: l->signature_type 25441
*** rpmReadSignature: sigType 25441
error: /mnt/redhat/comps/dist/7.0.x/i386/openssh-2.3.0p1-4.i386.rpm: rpmReadSignature failed
What is the expected output and why you think it is actually
a miscompilation?
I'll read it carefully tomorrow.

Comment 3 Jakub Jelinek 2001-02-21 17:34:21 UTC
I had to #undef ALPHA_LOSSAGE because otherwise the fault is in rpm source -
with ALPHA_LOSSAGE defined you rpmLead into one rpmlead structure and read from
a malloced one which was never initialized.
I've managed to minimize this into small testcase, am checking CVS gcc ATM.

Comment 4 Jakub Jelinek 2001-02-22 09:38:24 UTC
Fixed by
2000-08-11  Richard Henderson  <rth@cygnus.com>

        * combine.c (simplify_shift_const): Obey SHIFT_COUNT_TRUNCATED.
which will be included in gcc-2.96-76.
(and you please remove ALPHA_LOSSAGE next time you build rpm).


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