This is the mail archive of the cygwin@cygwin.com 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]

1.3.20: mmap with nonzero file offset results in seg fault (Win2k)"


Accessing the mapped region of memory after an mmap call 
with a non-zero offset results in a seg fault. A zero 
offset will not result in a seg fault.

Cygwin1.dll version 1.3.19 doesn't experience this problem.  
Cygcheck output is attached.

Example:

if (rslt = mmap(0, size, prot, MAP_SHARED,  fd, offset)) 
    == MAP_FAILED) {
} else {
    printf("%d", rslt[0]); // seg fault
}
AND
if (rslt = mmap(0, size, prot, MAP_SHARED,  fd, 0)) 
    == MAP_FAILED) {
} else {
    printf("%d", rslt[0]); // no seg fault (zero offset)
}

Attachment: cygcheck.out
Description: Binary data

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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