This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: BUG - Cygwin to GNU CC compatibility

On Tue, 6 Aug 2002, Arash Partow wrote:

> Hi Ernest,
> >If your program runs on a bunch of systems, well, you're just lucky,
> >because the bugs are in your code, not in cygwin.
> i doubt the efforts of the cygwin group can surpass those of borland
> and GCC and now after recieving your mail visual c++
> It seems that all these systems can produce perfectly running
> executables, running both on linux, solaris and windows.
> I don't think there is any luck involved in this, there is a bug and it
> needs to be fixed. out of the 4 compilers i compiled this code on only
> cygwin was the one to fail.

Whether a code with dangling pointers fails depends solely on the
implementation of the memory manager.  Some memory managers try not to
reuse memory as much, and thus, even if you free a pointer, the memory
may not be overwritten for short running programs, and using a dangling
pointer produces a semblance of correct operation.  However, failing to
run buggy programs is not in itself a bug.  A suggestion would be to try
to introduce a 'ulimit -m 5k' (or some other small value, so that your
free list becomes more of a bottleneck) on linux and try to run your
program again.  Unless the linux developers can work miracles, you can
limit the memory enough that free list entries become reused, and your
program will fail.

I won't reply to the rest, except to say I fully agree with everyone who
said your code is buggy, and I intend to prove it.

> [snip: a long defense of incorrect concepts and code]
> no two objects are using digitList, hence no crossing over into the
> twilight-zone.

:-D  Just you wait...
I've added printfs to your code to print the pointer value of the
digitList field whenever it's assigned, and just before it's freed.  This
should prove very illuminating.  Sit back and watch.  A zip is attached.
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

It took the computational power of three Commodore 64s to fly to the moon.
It takes a 486 to run Windows 95.  Something is wrong here. -- SC sig file

Description: Zip archive

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]