Bug 22560

Summary: compiler bug
Product: [Retired] Red Hat Linux Reporter: Need Real Name <aquastar>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: high    
Version: 6.2CC: dr
Target Milestone: ---   
Target Release: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-02-23 13:05:26 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 Need Real Name 2000-12-20 00:15:34 UTC
During comolation of course code using linux c and gcc, program compiled OK... cleanly and the 
program execution worked "as expected". However, when compiling 
the same code on a Unix workstation using gcc the compiler compiled cleanly but crashed on execution with 
a segmentation error/core dumped.

Back to Linux and using gdb I found that somehow my system had allocated the same memory address
 to  2 separate variables... which gcc didn't report on but was discovered during debug and a very close look since 
debug really didn't pick it up either. This is like a one in a billion chances (odds greater than winning lotto). The Unix 
system crashed but my pc didn't... Hmmmm???

To test the problem I simply added a bogus variable within the function where the probem occurred and assigned
a value. This caused my system to compile cleanly but seg fault during exec and consequenlty id the bug in
my code. However, the real problem is in the fact that the original code executed on my laptop (Acer Extenser 500
... it's crappy I know but all I can afford right now) but instantly crashed on a Unix workstation. This suggests a 
compatibility problem... hardward problem... I'm not sure. I hope this bug I useful to know:

Comment 1 Jakub Jelinek 2001-02-23 13:05:19 UTC
Since you attached no code, I cannot say anything to this.
Many programming errors for various reasons only pop up on certain architectures
or with certain compiler options, whatever.