Bug 22560 - compiler bug
Summary: compiler bug
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 6.2
Hardware: i586
OS: Linux
high
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-12-20 00:15 UTC by Need Real Name
Modified: 2005-10-31 22:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-02-23 13:05:26 UTC
Embargoed:


Attachments (Terms of Use)

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.


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