nt fclose() question...

Mumit Khan khan@xraylith.wisc.EDU
Tue Feb 23 08:25:00 GMT 1999


"Morgan D. Jones" <mjones@pobox.com> 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 cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list