possible mmap() problems

Christopher Faylor cgf@redhat.com
Wed Apr 16 19:47:00 GMT 2003


On Wed, Apr 16, 2003 at 03:40:07PM -0400, Joe Buehler wrote:
>Just an FYI:
>
>We have had to disable the use of mmap() in ksh93 because it is causing
>problems.  I don't know whether it is a ksh problem or a Cygwin
>problem, but what appears to be happening is that incorrect pages are
>being VirtualFree()'d or similar.  ksh will be running along and all of
>a sudden try to access something in its text segment and get a segment
>violation.  Work with gdb indicates that just a single page got zapped
>(marked inaccessible) in the middle of the text segment.
>
>It might not be Cygwin, it might be the ast library that ksh is based
>on.  Don't know.
>
>Sorry for the lack of details, it is another difficult bug, and we'll
>just not use mmap().

If it's predictable where the page is, then I wonder if you could set a
hardware watchpoint to catch when it is happening?  Or maybe even strace
would tell you.

I'm sure Corinna rues the day I asked her to check into mmap...

cgf



More information about the Cygwin-developers mailing list