home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!prism!gt7749b
- From: gt7749b@prism.gatech.EDU (Chris M.)
- Newsgroups: comp.lang.c++
- Subject: Re: Bug in Borland C++ 3.1: demonstration included
- Message-ID: <64105@hydra.gatech.EDU>
- Date: 22 Jul 92 17:39:26 GMT
- References: <22JUL199211253387@pine.circa.ufl.edu>
- Organization: Georgia Institute of Technology
- Lines: 61
-
- In article <22JUL199211253387@pine.circa.ufl.edu> hans@pine.circa.ufl.edu (Hans van Oostrom) writes:
- >I ran into a piece of code that will crash the Borland 3.1 compiler when
- >you compile it. It gives a General Protection Fault Exception 0D in the
- >bcc and bc compilers (I haven't try the tcw one). Try the following at home:
- >
- >// file showbug.cpp
- >[ code deleted ]
- >
- >I know that this is supposed to generate an error message because the stat
- >function doesn't have a prototype. I also know that stat is defined as
- >something else in the sys\stat.h file, but since I am not using that it
- >should be ok. If you change the name of stat or include a prototype it
- >works ok.
- >
- >If anybody can shine some light on this I would be interested.
- >I will forward this to Borland.
- >
-
-
- I hate to tell you this, but its not a bug in BCC/BC/ etc.
-
- I just attemopted to compile your program in BC, and with BCC.
- Both programs spit out an error about prototypes -- I got no
- exception faults.
-
- The exception Fault (0d) has never happened to me on the machine I am on:
- an AST Premium 486sx II.
-
- However, on a 386/25, I have gotten a 0D. Let me tell you what caused the
- 0D exception:
-
- My memory chips on the 386/25 are too slow to keep up with the 25 mhz
- speed of my 386. However, running the compuyter at 20mhz got rid of any
- 0D errors I have gotten. I have tested it alot (The 0D trap) -- it
- seems to be egenrated when memory cannot keep up with the processor.
- My memory is .. 80ns +.
-
- Borland may or may not have a clue as to what you are talking about:
- I am sure on their machines the compile will gebnerate an error,
- just like it did here. Like I said, I took your code piece, and
- the compiler generated two prototyping errors (stat() needs a
- prototype...)
-
- You may consider running your computer at a lower speed; (I assume you
- have at least a 286 since you are using bc 3.1). If this silves
- your problem, you will need memory chips that are faster. If you
- have a 486, you will generally need 53ns-60ns chips to avoid the
- problem.
-
- The reason that BC may fail while other programs doesn't is because
- BC uses your memory intensely, and thus, pushes it to its limit.
-
- OS/2 or Unix would more than likely fail at points on your computer
- if your memory isn't fast enough to keep up with the processor.
-
-
- --
- Chris McClellen
- Just Another Student, Georgia Institute of Technology
- Internet: gt7749b@prism.gatech.edu, ccastcm@prism.gatech.edu
- "Death may smell bad, but LIFE STINKS!"
-