Subject: Re: nt fclose() question...
From: "Morgan D. Jones" <[email-masked]>
To: Mumit Khan <[email-masked]>
Cc: cygwin mailing list <[email-masked]>, David Young <[email-masked]>
Date: Wed, 24 Feb 1999 10:10:46 -0800

Mumit...  sure enough...
I linked with electric fence and found I have some sort of memory problem that
I've never tracked down before.  This code has been in use for over a year
with only intermittent unexplained crashes.... (hence the memory error)

Thanks for the tip... I'm going to fix the memory error and see how the
fclose() works then...

Thanks again. MDJ

Mumit Khan wrote:

> "Morgan D. Jones" <[email-masked]> writes:
> > hi all...
> >
> > i've looked (not exhaustively) for an answer to this question, to no
> > avail...
> > I had a ANSI C console program on a mac that I wanted to port to NT...
> >
> > First I moved it to Linux and got it to work with gcc there...
> > (basically no modifications)
> > I then moved it to NT running cygwin 20.1...
> >
> > now I get a STATUS_ACCESS_VIOLATION when I perform an fclose()??  Mind
> > you this code worked fine under linux and Metrowerks C on a power Mac...
>
> More often than not, this type of access violation error typically arise
> due to a memory corruption bug in user's code. Please understand that
> just because a piece of code runs under a few systems, doesn't mean that
> it doesn't have bugs.
>
> Here's my suggestion: use a memory debugger and see if your code is clean.
> If it is, then it's possibly a bug in Cygwin or newlib (C library); please
> see if you can put together a bug report that we can look at.
>
> Since you have access to Linux, you can use ElectricFence to see if it
> catches anything. You can find prebuilt RPMs in various sites (search
> in http://www.rpmfind.net/).
>
> Regards,
> Mumit

--
Want to unsubscribe from this list?
Send a message to [email-masked]